diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml
index d01daf5689..ac9088bcc8 100644
--- a/.github/workflows/agent-performance-analyzer.lock.yml
+++ b/.github/workflows/agent-performance-analyzer.lock.yml
@@ -636,160 +636,162 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/meta-orchestrators` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: **
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/agent-performance-analyzer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/meta-orchestrators` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: **
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/agent-performance-analyzer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/agent-persona-explorer.lock.yml b/.github/workflows/agent-persona-explorer.lock.yml
index ebf6136b6f..376b4a01ee 100644
--- a/.github/workflows/agent-persona-explorer.lock.yml
+++ b/.github/workflows/agent-persona-explorer.lock.yml
@@ -530,136 +530,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/agent-persona-explorer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/agent-persona-explorer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/ai-moderator.lock.yml b/.github/workflows/ai-moderator.lock.yml
index 8ed69f4d65..2704695a56 100644
--- a/.github/workflows/ai-moderator.lock.yml
+++ b/.github/workflows/ai-moderator.lock.yml
@@ -513,65 +513,67 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/ai-moderator.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/ai-moderator.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml
index ae17bed95a..5249010b7a 100644
--- a/.github/workflows/archie.lock.yml
+++ b/.github/workflows/archie.lock.yml
@@ -511,65 +511,67 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/archie.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/archie.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml
index f144ffed27..be7ff1f7cd 100644
--- a/.github/workflows/artifacts-summary.lock.yml
+++ b/.github/workflows/artifacts-summary.lock.yml
@@ -480,137 +480,139 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/artifacts-summary.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/artifacts-summary.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml
index e9715d1d08..d1af858027 100644
--- a/.github/workflows/audit-workflows.lock.yml
+++ b/.github/workflows/audit-workflows.lock.yml
@@ -586,291 +586,293 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical audit data and patterns
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/audit-workflows` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/audit-workflows/*.json, memory/audit-workflows/*.jsonl, memory/audit-workflows/*.csv, memory/audit-workflows/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Python Environment Ready
-
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
- Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
-
- ## Store Historical Data (JSON Lines)
-
- ```python
- import json
- from datetime import datetime
-
- # Append data point
- with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
- f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
- ```
-
- ## Generate Charts
-
- ```python
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- df = pd.read_json('history.jsonl', lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
-
- sns.set_style("whitegrid")
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
- ax.set_title('Trend', fontsize=16, fontweight='bold')
- plt.xticks(rotation=45)
- plt.tight_layout()
- plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
- ```
-
- ## Best Practices
-
- - Use JSON Lines (`.jsonl`) for append-only storage
- - Include ISO 8601 timestamps in all data points
- - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
- - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/audit-workflows.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical audit data and patterns
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/audit-workflows` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/audit-workflows/*.json, memory/audit-workflows/*.jsonl, memory/audit-workflows/*.csv, memory/audit-workflows/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Python Environment Ready
+
+ Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
+ Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
+
+ ## Store Historical Data (JSON Lines)
+
+ ```python
+ import json
+ from datetime import datetime
+
+ # Append data point
+ with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
+ f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
+ ```
+
+ ## Generate Charts
+
+ ```python
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ df = pd.read_json('history.jsonl', lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+
+ sns.set_style("whitegrid")
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
+ ax.set_title('Trend', fontsize=16, fontweight='bold')
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+ plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ## Best Practices
+
+ - Use JSON Lines (`.jsonl`) for append-only storage
+ - Include ISO 8601 timestamps in all data points
+ - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
+ - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/audit-workflows.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/auto-triage-issues.lock.yml b/.github/workflows/auto-triage-issues.lock.yml
index 13b0d2f21b..253024222c 100644
--- a/.github/workflows/auto-triage-issues.lock.yml
+++ b/.github/workflows/auto-triage-issues.lock.yml
@@ -519,135 +519,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/auto-triage-issues.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/auto-triage-issues.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/blog-auditor.lock.yml b/.github/workflows/blog-auditor.lock.yml
index d0fa7c8b4d..863592f096 100644
--- a/.github/workflows/blog-auditor.lock.yml
+++ b/.github/workflows/blog-auditor.lock.yml
@@ -501,136 +501,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/playwright_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/blog-auditor.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/playwright_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/blog-auditor.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml
index edf07837d3..d1b8c4a325 100644
--- a/.github/workflows/brave.lock.yml
+++ b/.github/workflows/brave.lock.yml
@@ -505,70 +505,72 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/brave.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/brave.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/breaking-change-checker.lock.yml b/.github/workflows/breaking-change-checker.lock.yml
index 7c074a2f8a..89d862f17f 100644
--- a/.github/workflows/breaking-change-checker.lock.yml
+++ b/.github/workflows/breaking-change-checker.lock.yml
@@ -498,62 +498,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/breaking-change-checker.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/breaking-change-checker.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/changeset.lock.yml b/.github/workflows/changeset.lock.yml
index 4d69faa4b2..1a898be08f 100644
--- a/.github/workflows/changeset.lock.yml
+++ b/.github/workflows/changeset.lock.yml
@@ -605,213 +605,215 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Changeset Format Reference
-
- Based on https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md
-
- ### Basic Format
-
- ```markdown
- ---
- "gh-aw": patch
- ---
-
- Fixed a bug in the component rendering logic
- ```
-
- ### Version Bump Types
- - **patch**: Bug fixes, documentation updates, refactoring, non-breaking additions, new shared workflows (0.0.X)
- - **minor**: Breaking changes in the cli (0.X.0)
- - **major**: Major breaking changes. Very unlikely to be used often (X.0.0). You should be very careful when using this, it's probably a **minor**.
-
- ### Changeset File Structure
- - Create file in `.changeset/` directory with descriptive kebab-case name
- - Format: `-.md` (e.g., `minor-add-new-feature.md`)
- - Use quotes around package names in YAML frontmatter
- - Brief summary should be from PR title or first line of description
-
- ### Optional Codemod Section
-
- For **minor** or **major** changes that introduce breaking changes, include an optional "Codemod" section to help users update their code:
-
- ```markdown
- ---
- "gh-aw": minor
- ---
-
- Changed the workflow frontmatter field `engine` to require an object instead of a string.
-
- ## Codemod
-
- If you have workflows using the old string format for the `engine` field:
-
- ```yaml
- engine: copilot
- ```
-
- Update them to use the new object format:
-
- ```yaml
- engine:
- id: copilot
- ```
-
- This change applies to all workflows using the `engine` field in their frontmatter.
- ```
-
- The codemod section should:
- - Explain what code patterns are affected by the breaking change
- - Provide clear before/after examples showing how to update existing code
- - Specify which files or use cases need to be updated
- - Include any automation suggestions if applicable
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/changeset.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Changeset Format Reference
+
+ Based on https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md
+
+ ### Basic Format
+
+ ```markdown
+ ---
+ "gh-aw": patch
+ ---
+
+ Fixed a bug in the component rendering logic
+ ```
+
+ ### Version Bump Types
+ - **patch**: Bug fixes, documentation updates, refactoring, non-breaking additions, new shared workflows (0.0.X)
+ - **minor**: Breaking changes in the cli (0.X.0)
+ - **major**: Major breaking changes. Very unlikely to be used often (X.0.0). You should be very careful when using this, it's probably a **minor**.
+
+ ### Changeset File Structure
+ - Create file in `.changeset/` directory with descriptive kebab-case name
+ - Format: `-.md` (e.g., `minor-add-new-feature.md`)
+ - Use quotes around package names in YAML frontmatter
+ - Brief summary should be from PR title or first line of description
+
+ ### Optional Codemod Section
+
+ For **minor** or **major** changes that introduce breaking changes, include an optional "Codemod" section to help users update their code:
+
+ ```markdown
+ ---
+ "gh-aw": minor
+ ---
+
+ Changed the workflow frontmatter field `engine` to require an object instead of a string.
+
+ ## Codemod
+
+ If you have workflows using the old string format for the `engine` field:
+
+ ```yaml
+ engine: copilot
+ ```
+
+ Update them to use the new object format:
+
+ ```yaml
+ engine:
+ id: copilot
+ ```
+
+ This change applies to all workflows using the `engine` field in their frontmatter.
+ ```
+
+ The codemod section should:
+ - Explain what code patterns are affected by the breaking change
+ - Provide clear before/after examples showing how to update existing code
+ - Specify which files or use cases need to be updated
+ - Include any automation suggestions if applicable
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/changeset.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/chroma-issue-indexer.lock.yml b/.github/workflows/chroma-issue-indexer.lock.yml
index 53ae412fe7..791031d64b 100644
--- a/.github/workflows/chroma-issue-indexer.lock.yml
+++ b/.github/workflows/chroma-issue-indexer.lock.yml
@@ -296,73 +296,75 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Cache Folders Available
-
- You have access to persistent cache folders where you can read and write files to create memories and store information:
-
- - **chroma**: `/tmp/gh-aw/cache-memory-chroma/` - Persistent storage for Chroma vector database
-
- - **Read/Write Access**: You can freely read from and write to any files in these folders
- - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
- - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
- - **File Share**: Use these as simple file shares - organize files as you see fit
-
- Examples of what you can store:
- - `/tmp/gh-aw/cache-memory-chroma/notes.txt` - general notes and observations
- - `/tmp/gh-aw/cache-memory-chroma/preferences.json` - user preferences and settings
- - `/tmp/gh-aw/cache-memory-chroma/state/` - organized state files in subdirectories
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks.
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/chroma-issue-indexer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Cache Folders Available
+
+ You have access to persistent cache folders where you can read and write files to create memories and store information:
+
+ - **chroma**: `/tmp/gh-aw/cache-memory-chroma/` - Persistent storage for Chroma vector database
+
+ - **Read/Write Access**: You can freely read from and write to any files in these folders
+ - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
+ - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
+ - **File Share**: Use these as simple file shares - organize files as you see fit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/cache-memory-chroma/notes.txt` - general notes and observations
+ - `/tmp/gh-aw/cache-memory-chroma/preferences.json` - user preferences and settings
+ - `/tmp/gh-aw/cache-memory-chroma/state/` - organized state files in subdirectories
+
+ Feel free to create, read, update, and organize files in these folders as needed for your tasks.
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/chroma-issue-indexer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/ci-coach.lock.yml b/.github/workflows/ci-coach.lock.yml
index 2a567aff5a..21108c14ee 100644
--- a/.github/workflows/ci-coach.lock.yml
+++ b/.github/workflows/ci-coach.lock.yml
@@ -543,496 +543,498 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # CI Data Analysis
-
- Pre-downloaded CI run data and artifacts are available for analysis:
-
- ## Available Data
-
- 1. **CI Runs**: `/tmp/ci-runs.json`
- - Last 100 workflow runs with status, timing, and metadata
-
- 2. **Artifacts**: `/tmp/ci-artifacts/`
- - Coverage reports and benchmark results from recent successful runs
- - **Fuzz test results**: `*/fuzz-results/*.txt` - Output from fuzz tests
- - **Fuzz corpus data**: `*/fuzz-results/corpus/*` - Input corpus for each fuzz test
-
- 3. **CI Configuration**: `.github/workflows/ci.yml`
- - Current CI workflow configuration
-
- 4. **Cache Memory**: `/tmp/cache-memory/`
- - Historical analysis data from previous runs
-
- 5. **Test Results**: `/tmp/gh-aw/test-results.json`
- - JSON output from Go unit tests with performance and timing data
-
- ## Test Case Locations
-
- Go test cases are located throughout the repository:
- - **Command tests**: `./cmd/gh-aw/*_test.go`
- - **Workflow tests**: `./pkg/workflow/*_test.go`
- - **CLI tests**: `./pkg/cli/*_test.go`
- - **Parser tests**: `./pkg/parser/*_test.go`
- - **Campaign tests**: `./pkg/campaign/*_test.go`
- - **Other package tests**: Various `./pkg/*/test.go` files
-
- ## Environment Setup
-
- The workflow has already completed:
- - ✅ **Linting**: Dev dependencies installed, linters run successfully
- - ✅ **Building**: Code built with `make build`, lock files compiled with `make recompile`
- - ✅ **Testing**: Unit tests run (with performance data collected in JSON format)
-
- This means you can:
- - Make changes to code or configuration files
- - Validate changes immediately by running `make lint`, `make build`, or `make test-unit`
- - Ensure proposed optimizations don't break functionality before creating a PR
-
- ## Analyzing Run Data
-
- Parse the downloaded CI runs data:
-
- ```bash
- # Analyze run data
- cat /tmp/ci-runs.json | jq '
- {
- total_runs: length,
- by_status: group_by(.status) | map({status: .[0].status, count: length}),
- by_conclusion: group_by(.conclusion) | map({conclusion: .[0].conclusion, count: length}),
- by_branch: group_by(.headBranch) | map({branch: .[0].headBranch, count: length}),
- by_event: group_by(.event) | map({event: .[0].event, count: length})
- }'
- ```
-
- **Metrics to extract:**
- - Success rate per job
- - Average duration per job
- - Failure patterns (which jobs fail most often)
- - Cache hit rates from step summaries
- - Resource usage patterns
-
- ## Review Artifacts
-
- Examine downloaded artifacts for insights:
-
- ```bash
- # List downloaded artifacts
- find /tmp/ci-artifacts -type f -name "*.txt" -o -name "*.html" -o -name "*.json"
-
- # Analyze coverage reports if available
- # Check benchmark results for performance trends
- ```
-
- ## Historical Context
-
- Check cache memory for previous analyses:
-
- ```bash
- # Read previous optimization recommendations
- if [ -f /tmp/cache-memory/ci-coach/last-analysis.json ]; then
- cat /tmp/cache-memory/ci-coach/last-analysis.json
- fi
-
- # Check if previous recommendations were implemented
- # Compare current metrics with historical baselines
- ```
-
- # CI Optimization Analysis Strategies
-
- Comprehensive strategies for analyzing CI workflows to identify optimization opportunities.
-
- ## Phase 1: CI Configuration Study
-
- Read and understand the current CI workflow structure:
-
- ```bash
- # Read the CI workflow configuration
- cat .github/workflows/ci.yml
-
- # Understand the job structure
- # - lint (runs first)
- # - test (depends on lint)
- # - integration (depends on test, matrix strategy)
- # - build (depends on lint)
- # etc.
- ```
-
- **Key aspects to analyze:**
- - Job dependencies and parallelization opportunities
- - Cache usage patterns (Go cache, Node cache)
- - Matrix strategy effectiveness
- - Timeout configurations
- - Concurrency groups
- - Artifact retention policies
-
- ## Phase 2: Test Coverage Analysis
-
- ### Critical: Ensure ALL Tests are Executed
-
- **Step 1: Get complete list of all tests**
- ```bash
- # List all test functions in the repository
- go test -list='^Test' ./... 2>&1 | grep -E '^Test' > /tmp/all-tests.txt
-
- # Count total tests
- TOTAL_TESTS=$(wc -l < /tmp/all-tests.txt)
- echo "Total tests found: $TOTAL_TESTS"
- ```
-
- **Step 2: Analyze unit test coverage**
- ```bash
- # Unit tests run all non-integration tests
- # Verify the test job's command captures all non-integration tests
- # Current: go test -v -parallel=8 -timeout=3m -tags '!integration' -run='^Test' ./...
-
- # Get list of integration tests (tests with integration build tag)
- grep -r "//go:build integration" --include="*_test.go" . | cut -d: -f1 | sort -u > /tmp/integration-test-files.txt
-
- # Estimate number of integration tests
- echo "Files with integration tests:"
- wc -l < /tmp/integration-test-files.txt
- ```
-
- **Step 3: Analyze integration test matrix coverage**
- ```bash
- # The integration job has a matrix with specific patterns
- # Each matrix entry targets specific packages and test patterns
-
- # CRITICAL CHECK: Are there tests that don't match ANY pattern?
-
- # Extract all integration test patterns from ci.yml
- cat .github/workflows/ci.yml | grep -A 2 'pattern:' | grep 'pattern:' > /tmp/matrix-patterns.txt
-
- # Check for catch-all groups
- cat .github/workflows/ci.yml | grep -B 2 'pattern: ""' | grep 'name:' > /tmp/catchall-groups.txt
- ```
-
- **Step 4: Identify coverage gaps**
- ```bash
- # Check if each package with tests is covered by at least one matrix group
- # Compare packages with tests vs. packages in CI matrix
- # Identify any "orphaned" tests not executed by any job
- ```
-
- **Required Action if Gaps Found:**
- If any tests are not covered by the CI matrix, propose adding:
- 1. **Catch-all matrix groups** for packages with specific patterns but no catch-all
- 2. **New matrix entries** for packages not in the matrix at all
-
- Example fix for missing catch-all (add to `.github/workflows/ci.yml`):
- ```yaml
- # Add to the integration job's matrix.include section:
- - name: "CLI Other" # Catch-all for tests not matched by specific patterns
- packages: "./pkg/cli"
- pattern: "" # Empty pattern runs all remaining tests
- ```
-
- ## Phase 3: Test Performance Optimization
-
- ### A. Test Splitting Analysis
- - Review current test matrix configuration
- - Analyze if test groups are balanced in execution time
- - Suggest rebalancing to minimize longest-running group
-
- ### B. Test Parallelization Within Jobs
- - Check if tests run sequentially when they could run in parallel
- - Suggest using `go test -parallel=N` to increase parallelism
- - Analyze if `-count=1` is necessary for all tests
-
- ### C. Test Selection Optimization
- - Suggest path-based test filtering to skip irrelevant tests
- - Recommend running only affected tests for non-main branch pushes
-
- ### D. Test Timeout Optimization
- - Review current timeout settings
- - Check if timeouts are too conservative or too tight
- - Suggest adjusting per-job timeouts based on historical data
-
- ### E. Test Dependencies Analysis
- - Examine test job dependencies
- - Suggest removing unnecessary dependencies to enable more parallelism
-
- ### F. Selective Test Execution
- - Suggest running expensive tests only on main branch or on-demand
- - Recommend running security scans conditionally
-
- ### G. Matrix Strategy Optimization
- - Analyze if all integration test matrix jobs are necessary
- - Check if some matrix jobs could be combined or run conditionally
- - Suggest reducing matrix size for PR builds vs. main branch builds
-
- ## Phase 4: Resource Optimization
-
- ### Job Parallelization
- - Identify jobs that could run in parallel but currently don't
- - Restructure dependencies to reduce critical path
- - Example: Could some test jobs start earlier?
-
- ### Cache Optimization
- - Analyze cache hit rates
- - Suggest caching more aggressively (dependencies, build artifacts)
- - Check if cache keys are properly scoped
-
- ### Resource Right-Sizing
- - Check if timeouts are set appropriately
- - Evaluate if jobs could run on faster runners
- - Review concurrency groups
-
- ### Artifact Management
- - Check if retention days are optimal
- - Identify unnecessary artifacts
- - Example: Coverage reports only need 7 days retention
-
- ### Dependency Installation
- - Check for redundant dependency installations
- - Suggest using dependency caching more effectively
- - Example: Sharing `node_modules` between jobs
-
- ## Phase 5: Cost-Benefit Analysis
-
- For each potential optimization:
- - **Impact**: How much time/cost savings?
- - **Effort**: How difficult to implement?
- - **Risk**: Could it break the build or miss issues?
- - **Priority**: High/Medium/Low
-
- ## Optimization Categories
-
- 1. **Job Parallelization** - Reduce critical path
- 2. **Cache Optimization** - Improve cache hit rates
- 3. **Test Suite Restructuring** - Balance test execution
- 4. **Resource Right-Sizing** - Optimize timeouts and runners
- 5. **Artifact Management** - Reduce unnecessary uploads
- 6. **Matrix Strategy** - Balance breadth vs. speed
- 7. **Conditional Execution** - Skip unnecessary jobs
- 8. **Dependency Installation** - Reduce redundant work
-
- ## Expected Metrics
-
- Track these metrics before and after optimization:
- - Total CI duration (wall clock time)
- - Critical path duration
- - Cache hit rates
- - Test execution time
- - Resource utilization
- - Cost per CI run
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/ci-coach.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # CI Data Analysis
+
+ Pre-downloaded CI run data and artifacts are available for analysis:
+
+ ## Available Data
+
+ 1. **CI Runs**: `/tmp/ci-runs.json`
+ - Last 100 workflow runs with status, timing, and metadata
+
+ 2. **Artifacts**: `/tmp/ci-artifacts/`
+ - Coverage reports and benchmark results from recent successful runs
+ - **Fuzz test results**: `*/fuzz-results/*.txt` - Output from fuzz tests
+ - **Fuzz corpus data**: `*/fuzz-results/corpus/*` - Input corpus for each fuzz test
+
+ 3. **CI Configuration**: `.github/workflows/ci.yml`
+ - Current CI workflow configuration
+
+ 4. **Cache Memory**: `/tmp/cache-memory/`
+ - Historical analysis data from previous runs
+
+ 5. **Test Results**: `/tmp/gh-aw/test-results.json`
+ - JSON output from Go unit tests with performance and timing data
+
+ ## Test Case Locations
+
+ Go test cases are located throughout the repository:
+ - **Command tests**: `./cmd/gh-aw/*_test.go`
+ - **Workflow tests**: `./pkg/workflow/*_test.go`
+ - **CLI tests**: `./pkg/cli/*_test.go`
+ - **Parser tests**: `./pkg/parser/*_test.go`
+ - **Campaign tests**: `./pkg/campaign/*_test.go`
+ - **Other package tests**: Various `./pkg/*/test.go` files
+
+ ## Environment Setup
+
+ The workflow has already completed:
+ - ✅ **Linting**: Dev dependencies installed, linters run successfully
+ - ✅ **Building**: Code built with `make build`, lock files compiled with `make recompile`
+ - ✅ **Testing**: Unit tests run (with performance data collected in JSON format)
+
+ This means you can:
+ - Make changes to code or configuration files
+ - Validate changes immediately by running `make lint`, `make build`, or `make test-unit`
+ - Ensure proposed optimizations don't break functionality before creating a PR
+
+ ## Analyzing Run Data
+
+ Parse the downloaded CI runs data:
+
+ ```bash
+ # Analyze run data
+ cat /tmp/ci-runs.json | jq '
+ {
+ total_runs: length,
+ by_status: group_by(.status) | map({status: .[0].status, count: length}),
+ by_conclusion: group_by(.conclusion) | map({conclusion: .[0].conclusion, count: length}),
+ by_branch: group_by(.headBranch) | map({branch: .[0].headBranch, count: length}),
+ by_event: group_by(.event) | map({event: .[0].event, count: length})
+ }'
+ ```
+
+ **Metrics to extract:**
+ - Success rate per job
+ - Average duration per job
+ - Failure patterns (which jobs fail most often)
+ - Cache hit rates from step summaries
+ - Resource usage patterns
+
+ ## Review Artifacts
+
+ Examine downloaded artifacts for insights:
+
+ ```bash
+ # List downloaded artifacts
+ find /tmp/ci-artifacts -type f -name "*.txt" -o -name "*.html" -o -name "*.json"
+
+ # Analyze coverage reports if available
+ # Check benchmark results for performance trends
+ ```
+
+ ## Historical Context
+
+ Check cache memory for previous analyses:
+
+ ```bash
+ # Read previous optimization recommendations
+ if [ -f /tmp/cache-memory/ci-coach/last-analysis.json ]; then
+ cat /tmp/cache-memory/ci-coach/last-analysis.json
+ fi
+
+ # Check if previous recommendations were implemented
+ # Compare current metrics with historical baselines
+ ```
+
+ # CI Optimization Analysis Strategies
+
+ Comprehensive strategies for analyzing CI workflows to identify optimization opportunities.
+
+ ## Phase 1: CI Configuration Study
+
+ Read and understand the current CI workflow structure:
+
+ ```bash
+ # Read the CI workflow configuration
+ cat .github/workflows/ci.yml
+
+ # Understand the job structure
+ # - lint (runs first)
+ # - test (depends on lint)
+ # - integration (depends on test, matrix strategy)
+ # - build (depends on lint)
+ # etc.
+ ```
+
+ **Key aspects to analyze:**
+ - Job dependencies and parallelization opportunities
+ - Cache usage patterns (Go cache, Node cache)
+ - Matrix strategy effectiveness
+ - Timeout configurations
+ - Concurrency groups
+ - Artifact retention policies
+
+ ## Phase 2: Test Coverage Analysis
+
+ ### Critical: Ensure ALL Tests are Executed
+
+ **Step 1: Get complete list of all tests**
+ ```bash
+ # List all test functions in the repository
+ go test -list='^Test' ./... 2>&1 | grep -E '^Test' > /tmp/all-tests.txt
+
+ # Count total tests
+ TOTAL_TESTS=$(wc -l < /tmp/all-tests.txt)
+ echo "Total tests found: $TOTAL_TESTS"
+ ```
+
+ **Step 2: Analyze unit test coverage**
+ ```bash
+ # Unit tests run all non-integration tests
+ # Verify the test job's command captures all non-integration tests
+ # Current: go test -v -parallel=8 -timeout=3m -tags '!integration' -run='^Test' ./...
+
+ # Get list of integration tests (tests with integration build tag)
+ grep -r "//go:build integration" --include="*_test.go" . | cut -d: -f1 | sort -u > /tmp/integration-test-files.txt
+
+ # Estimate number of integration tests
+ echo "Files with integration tests:"
+ wc -l < /tmp/integration-test-files.txt
+ ```
+
+ **Step 3: Analyze integration test matrix coverage**
+ ```bash
+ # The integration job has a matrix with specific patterns
+ # Each matrix entry targets specific packages and test patterns
+
+ # CRITICAL CHECK: Are there tests that don't match ANY pattern?
+
+ # Extract all integration test patterns from ci.yml
+ cat .github/workflows/ci.yml | grep -A 2 'pattern:' | grep 'pattern:' > /tmp/matrix-patterns.txt
+
+ # Check for catch-all groups
+ cat .github/workflows/ci.yml | grep -B 2 'pattern: ""' | grep 'name:' > /tmp/catchall-groups.txt
+ ```
+
+ **Step 4: Identify coverage gaps**
+ ```bash
+ # Check if each package with tests is covered by at least one matrix group
+ # Compare packages with tests vs. packages in CI matrix
+ # Identify any "orphaned" tests not executed by any job
+ ```
+
+ **Required Action if Gaps Found:**
+ If any tests are not covered by the CI matrix, propose adding:
+ 1. **Catch-all matrix groups** for packages with specific patterns but no catch-all
+ 2. **New matrix entries** for packages not in the matrix at all
+
+ Example fix for missing catch-all (add to `.github/workflows/ci.yml`):
+ ```yaml
+ # Add to the integration job's matrix.include section:
+ - name: "CLI Other" # Catch-all for tests not matched by specific patterns
+ packages: "./pkg/cli"
+ pattern: "" # Empty pattern runs all remaining tests
+ ```
+
+ ## Phase 3: Test Performance Optimization
+
+ ### A. Test Splitting Analysis
+ - Review current test matrix configuration
+ - Analyze if test groups are balanced in execution time
+ - Suggest rebalancing to minimize longest-running group
+
+ ### B. Test Parallelization Within Jobs
+ - Check if tests run sequentially when they could run in parallel
+ - Suggest using `go test -parallel=N` to increase parallelism
+ - Analyze if `-count=1` is necessary for all tests
+
+ ### C. Test Selection Optimization
+ - Suggest path-based test filtering to skip irrelevant tests
+ - Recommend running only affected tests for non-main branch pushes
+
+ ### D. Test Timeout Optimization
+ - Review current timeout settings
+ - Check if timeouts are too conservative or too tight
+ - Suggest adjusting per-job timeouts based on historical data
+
+ ### E. Test Dependencies Analysis
+ - Examine test job dependencies
+ - Suggest removing unnecessary dependencies to enable more parallelism
+
+ ### F. Selective Test Execution
+ - Suggest running expensive tests only on main branch or on-demand
+ - Recommend running security scans conditionally
+
+ ### G. Matrix Strategy Optimization
+ - Analyze if all integration test matrix jobs are necessary
+ - Check if some matrix jobs could be combined or run conditionally
+ - Suggest reducing matrix size for PR builds vs. main branch builds
+
+ ## Phase 4: Resource Optimization
+
+ ### Job Parallelization
+ - Identify jobs that could run in parallel but currently don't
+ - Restructure dependencies to reduce critical path
+ - Example: Could some test jobs start earlier?
+
+ ### Cache Optimization
+ - Analyze cache hit rates
+ - Suggest caching more aggressively (dependencies, build artifacts)
+ - Check if cache keys are properly scoped
+
+ ### Resource Right-Sizing
+ - Check if timeouts are set appropriately
+ - Evaluate if jobs could run on faster runners
+ - Review concurrency groups
+
+ ### Artifact Management
+ - Check if retention days are optimal
+ - Identify unnecessary artifacts
+ - Example: Coverage reports only need 7 days retention
+
+ ### Dependency Installation
+ - Check for redundant dependency installations
+ - Suggest using dependency caching more effectively
+ - Example: Sharing `node_modules` between jobs
+
+ ## Phase 5: Cost-Benefit Analysis
+
+ For each potential optimization:
+ - **Impact**: How much time/cost savings?
+ - **Effort**: How difficult to implement?
+ - **Risk**: Could it break the build or miss issues?
+ - **Priority**: High/Medium/Low
+
+ ## Optimization Categories
+
+ 1. **Job Parallelization** - Reduce critical path
+ 2. **Cache Optimization** - Improve cache hit rates
+ 3. **Test Suite Restructuring** - Balance test execution
+ 4. **Resource Right-Sizing** - Optimize timeouts and runners
+ 5. **Artifact Management** - Reduce unnecessary uploads
+ 6. **Matrix Strategy** - Balance breadth vs. speed
+ 7. **Conditional Execution** - Skip unnecessary jobs
+ 8. **Dependency Installation** - Reduce redundant work
+
+ ## Expected Metrics
+
+ Track these metrics before and after optimization:
+ - Total CI duration (wall clock time)
+ - Critical path duration
+ - Cache hit rates
+ - Test execution time
+ - Resource utilization
+ - Cost per CI run
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/ci-coach.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml
index 42d5faaf74..f8ed0abb9f 100644
--- a/.github/workflows/ci-doctor.lock.yml
+++ b/.github/workflows/ci-doctor.lock.yml
@@ -558,63 +558,65 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/ci-doctor.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/ci-doctor.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/claude-code-user-docs-review.lock.yml b/.github/workflows/claude-code-user-docs-review.lock.yml
index c12807ec3b..a2c4e9e125 100644
--- a/.github/workflows/claude-code-user-docs-review.lock.yml
+++ b/.github/workflows/claude-code-user-docs-review.lock.yml
@@ -492,63 +492,65 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/claude-code-user-docs-review.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/claude-code-user-docs-review.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/cli-consistency-checker.lock.yml b/.github/workflows/cli-consistency-checker.lock.yml
index b7aef7bacc..94623e95e3 100644
--- a/.github/workflows/cli-consistency-checker.lock.yml
+++ b/.github/workflows/cli-consistency-checker.lock.yml
@@ -497,62 +497,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/cli-consistency-checker.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/cli-consistency-checker.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml
index 1753b8b1c8..1f40f30340 100644
--- a/.github/workflows/cli-version-checker.lock.yml
+++ b/.github/workflows/cli-version-checker.lock.yml
@@ -520,222 +520,224 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/cli-version-checker.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/cli-version-checker.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml
index 4e354e2d15..177639c2ef 100644
--- a/.github/workflows/cloclo.lock.yml
+++ b/.github/workflows/cloclo.lock.yml
@@ -663,158 +663,160 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/playwright_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/cloclo.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/playwright_prompt.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/cloclo.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/code-scanning-fixer.lock.yml b/.github/workflows/code-scanning-fixer.lock.yml
index c3e8a80f58..4e7ba9fbfe 100644
--- a/.github/workflows/code-scanning-fixer.lock.yml
+++ b/.github/workflows/code-scanning-fixer.lock.yml
@@ -542,85 +542,87 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Locations Available
-
- You have access to persistent repo memory folders where you can read and write files that are stored in git branches:
-
- - **campaigns**: `/tmp/gh-aw/repo-memory/campaigns/` (branch: `memory/campaigns`)
-
- - **Read/Write Access**: You can freely read from and write to any files in these folders
- - **Git Branch Storage**: Each memory is stored in its own git branch
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/history/` - organized history files
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/code-scanning-fixer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Locations Available
+
+ You have access to persistent repo memory folders where you can read and write files that are stored in git branches:
+
+ - **campaigns**: `/tmp/gh-aw/repo-memory/campaigns/` (branch: `memory/campaigns`)
+
+ - **Read/Write Access**: You can freely read from and write to any files in these folders
+ - **Git Branch Storage**: Each memory is stored in its own git branch
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/history/` - organized history files
+
+ Feel free to create, read, update, and organize files in these folders as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/code-scanning-fixer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml
index 21ff4ff494..b0d0ecd04e 100644
--- a/.github/workflows/code-simplifier.lock.yml
+++ b/.github/workflows/code-simplifier.lock.yml
@@ -493,135 +493,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/code-simplifier.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/code-simplifier.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/codex-github-remote-mcp-test.lock.yml b/.github/workflows/codex-github-remote-mcp-test.lock.yml
index 64dbf3ad05..0ad555d0bb 100644
--- a/.github/workflows/codex-github-remote-mcp-test.lock.yml
+++ b/.github/workflows/codex-github-remote-mcp-test.lock.yml
@@ -265,47 +265,49 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/codex-github-remote-mcp-test.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/codex-github-remote-mcp-test.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/commit-changes-analyzer.lock.yml b/.github/workflows/commit-changes-analyzer.lock.yml
index 34cee3de37..21ecff0e26 100644
--- a/.github/workflows/commit-changes-analyzer.lock.yml
+++ b/.github/workflows/commit-changes-analyzer.lock.yml
@@ -486,135 +486,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/commit-changes-analyzer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/commit-changes-analyzer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml
index 963e8c1b73..a6560d545d 100644
--- a/.github/workflows/copilot-agent-analysis.lock.yml
+++ b/.github/workflows/copilot-agent-analysis.lock.yml
@@ -516,249 +516,251 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical agent performance metrics
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/copilot-agent-analysis` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/copilot-agent-analysis/*.json, memory/copilot-agent-analysis/*.jsonl, memory/copilot-agent-analysis/*.csv, memory/copilot-agent-analysis/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-agent-analysis.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical agent performance metrics
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/copilot-agent-analysis` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/copilot-agent-analysis/*.json, memory/copilot-agent-analysis/*.jsonl, memory/copilot-agent-analysis/*.csv, memory/copilot-agent-analysis/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-agent-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/copilot-cli-deep-research.lock.yml b/.github/workflows/copilot-cli-deep-research.lock.yml
index 2c51ba2adf..96ead09a55 100644
--- a/.github/workflows/copilot-cli-deep-research.lock.yml
+++ b/.github/workflows/copilot-cli-deep-research.lock.yml
@@ -491,160 +491,162 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Copilot CLI research notes and analysis history
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/copilot-cli-research` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/copilot-cli-research/*.json, memory/copilot-cli-research/*.md
- - **Max File Size**: 204800 bytes (0.20 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-cli-deep-research.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Copilot CLI research notes and analysis history
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/copilot-cli-research` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/copilot-cli-research/*.json, memory/copilot-cli-research/*.md
+ - **Max File Size**: 204800 bytes (0.20 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-cli-deep-research.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/copilot-pr-merged-report.lock.yml b/.github/workflows/copilot-pr-merged-report.lock.yml
index 7875c6b10c..7342bf4028 100644
--- a/.github/workflows/copilot-pr-merged-report.lock.yml
+++ b/.github/workflows/copilot-pr-merged-report.lock.yml
@@ -562,124 +562,126 @@ jobs:
GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- **IMPORTANT**: Always use the `safeinputs-gh` tool for GitHub CLI commands instead of running `gh` directly via bash. The `safeinputs-gh` tool has proper authentication configured with `GITHUB_TOKEN`, while bash commands do not have GitHub CLI authentication by default.
-
- **Correct**:
- ```
- Use the safeinputs-gh tool with args: "pr list --limit 5"
- Use the safeinputs-gh tool with args: "issue view 123"
- ```
-
- **Incorrect**:
- ```
- Use the gh safe-input tool with args: "pr list --limit 5" ❌ (Wrong tool name - use safeinputs-gh)
- Run: gh pr list --limit 5 ❌ (No authentication in bash)
- Execute bash: gh issue view 123 ❌ (No authentication in bash)
- ```
-
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-pr-merged-report.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ **IMPORTANT**: Always use the `safeinputs-gh` tool for GitHub CLI commands instead of running `gh` directly via bash. The `safeinputs-gh` tool has proper authentication configured with `GITHUB_TOKEN`, while bash commands do not have GitHub CLI authentication by default.
+
+ **Correct**:
+ ```
+ Use the safeinputs-gh tool with args: "pr list --limit 5"
+ Use the safeinputs-gh tool with args: "issue view 123"
+ ```
+
+ **Incorrect**:
+ ```
+ Use the gh safe-input tool with args: "pr list --limit 5" ❌ (Wrong tool name - use safeinputs-gh)
+ Run: gh pr list --limit 5 ❌ (No authentication in bash)
+ Execute bash: gh issue view 123 ❌ (No authentication in bash)
+ ```
+
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-pr-merged-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Validate prompt placeholders
env:
GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml
index 9cc5c26766..f5027d1ab2 100644
--- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml
+++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml
@@ -570,497 +570,499 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical NLP analysis results
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/nlp-analysis` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/nlp-analysis/*.json, memory/nlp-analysis/*.jsonl, memory/nlp-analysis/*.csv, memory/nlp-analysis/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-pr-nlp-analysis.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical NLP analysis results
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/nlp-analysis` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/nlp-analysis/*.json, memory/nlp-analysis/*.jsonl, memory/nlp-analysis/*.csv, memory/nlp-analysis/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-pr-nlp-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml
index 34ee21a912..fd7c25c1b3 100644
--- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml
+++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml
@@ -512,249 +512,251 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical prompt pattern analysis
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/prompt-analysis` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/prompt-analysis/*.json, memory/prompt-analysis/*.jsonl, memory/prompt-analysis/*.csv, memory/prompt-analysis/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-pr-prompt-analysis.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical prompt pattern analysis
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/prompt-analysis` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/prompt-analysis/*.json, memory/prompt-analysis/*.jsonl, memory/prompt-analysis/*.csv, memory/prompt-analysis/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-pr-prompt-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/copilot-session-insights.lock.yml b/.github/workflows/copilot-session-insights.lock.yml
index 9f5ee1a092..4afd17d86c 100644
--- a/.github/workflows/copilot-session-insights.lock.yml
+++ b/.github/workflows/copilot-session-insights.lock.yml
@@ -569,830 +569,832 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical session analysis data
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/session-insights` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/session-insights/*.json, memory/session-insights/*.jsonl, memory/session-insights/*.csv, memory/session-insights/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
- {
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
-
- # Session Analysis Chart Generation
-
- You are an expert at creating session analysis trend charts that reveal insights about Copilot agent session patterns over time.
-
- ## 📊 Chart Generation Requirements
-
- **IMPORTANT**: Generate exactly 2 trend charts that showcase Copilot agent session patterns over time.
-
- ### Chart Generation Process
-
- **Phase 1: Data Collection**
-
- Collect data for the past 30 days (or available data) from cache memory and session logs:
-
- 1. **Session Completion Data**:
- - Count of sessions completed successfully per day
- - Count of sessions failed/abandoned per day
- - Completion rate percentage per day
-
- 2. **Session Duration Data**:
- - Average session duration per day (in minutes)
- - Median session duration per day
- - Number of sessions with loops/retries
-
- **Phase 2: Data Preparation**
-
- 1. Create CSV files in `/tmp/gh-aw/python/data/` with the collected data:
- - `session_completion.csv` - Daily completion counts and rates
- - `session_duration.csv` - Daily duration statistics
-
- 2. Each CSV should have a date column and metric columns with appropriate headers
-
- **Phase 3: Chart Generation**
-
- Generate exactly **2 high-quality trend charts**:
-
- **Chart 1: Session Completion Trends**
- - Multi-line chart showing:
- - Successful completions (line, green)
- - Failed/abandoned sessions (line, red)
- - Completion rate percentage (line with secondary y-axis)
- - X-axis: Date (last 30 days)
- - Y-axis: Count (left), Percentage (right)
- - Save as: `/tmp/gh-aw/python/charts/session_completion_trends.png`
-
- **Chart 2: Session Duration & Efficiency**
- - Dual visualization showing:
- - Average session duration (line)
- - Median session duration (line)
- - Sessions with loops (bar chart overlay)
- - X-axis: Date (last 30 days)
- - Y-axis: Duration in minutes
- - Save as: `/tmp/gh-aw/python/charts/session_duration_trends.png`
-
- **Chart Quality Requirements**:
- - DPI: 300 minimum
- - Figure size: 12x7 inches for better readability
- - Use seaborn styling with a professional color palette
- - Include grid lines for easier reading
- - Clear, large labels and legend
- - Title with context (e.g., "Session Completion Rates - Last 30 Days")
- - Annotations for significant changes or anomalies
-
- **Phase 4: Upload Charts**
-
- 1. Upload both charts using the `upload asset` tool
- 2. Collect the returned URLs for embedding in the discussion
-
- **Phase 5: Embed Charts in Discussion**
-
- Include the charts in your analysis report with this structure:
-
- ```markdown
- ## 📈 Session Trends Analysis
-
- ### Completion Patterns
- 
-
- [Brief 2-3 sentence analysis of completion trends, highlighting improvements in success rates or concerning patterns]
-
- ### Duration & Efficiency
- 
-
- [Brief 2-3 sentence analysis of session duration patterns, noting efficiency improvements or areas needing attention]
- ```
-
- ### Python Implementation Notes
-
- - Use pandas for data manipulation and date handling
- - Use matplotlib.pyplot and seaborn for visualization
- - Set appropriate date formatters for x-axis labels
- - Use `plt.xticks(rotation=45)` for readable date labels
- - Apply `plt.tight_layout()` before saving
- - Handle cases where data might be sparse or missing
-
- ### Error Handling
-
- If insufficient data is available (less than 7 days):
- - Generate the charts with available data
- - Add a note in the analysis mentioning the limited data range
- - Consider using a bar chart instead of line chart for very sparse data
-
- # Session Analysis Strategies
-
- Comprehensive strategies for analyzing Copilot agent sessions to extract insights, identify patterns, and recommend improvements.
-
- ## Standard Analysis Strategies
-
- These strategies should be applied to every session analysis:
-
- ### 1. Completion Analysis
- - Did the session complete successfully?
- - Was the task abandoned or aborted?
- - Look for error messages or failure indicators
- - Track completion rate
-
- ### 2. Loop Detection
- - Identify repetitive agent responses
- - Detect circular reasoning or stuck patterns
- - Count iteration loops without progress
- - Flag sessions with excessive retries
-
- ### 3. Prompt Structure Analysis
- - Analyze task description clarity
- - Identify effective prompt patterns
- - Cluster prompts by keywords or structure
- - Correlate prompt quality with success
-
- ### 4. Context Confusion Detection
- - Look for signs of missing context
- - Identify requests for clarification
- - Track contextual misunderstandings
- - Note when agent asks for more information
-
- ### 5. Error Recovery Analysis
- - How does the agent handle errors?
- - Track error types and recovery strategies
- - Measure time to recover from failures
- - Identify successful vs. failed recoveries
-
- ### 6. Tool Usage Patterns
- - Which tools are used most frequently?
- - Are tools used effectively?
- - Identify missing or unavailable tools
- - Track tool execution success rates
-
- ## Experimental Strategies (30% of runs)
-
- **Determine if this is an experimental run**:
- ```bash
- # Generate random number between 0-100 using shell's RANDOM variable
- # Note: Requires bash shell. On systems without bash, use: $(od -An -N1 -tu1 /dev/urandom | awk '{print $1}')
- RANDOM_VALUE=$((RANDOM % 100))
- # If value < 30, this is an experimental run
- ```
-
- **Novel Analysis Methods to Try** (rotate through these):
-
- ### 1. Semantic Clustering
- - Group prompts by semantic similarity
- - Identify common themes across sessions
- - Find outlier prompts that perform differently
- - Use keyword extraction and comparison
-
- ### 2. Temporal Analysis
- - Analyze session duration patterns
- - Identify time-of-day effects
- - Track performance trends over time
- - Correlate timing with success rates
-
- ### 3. Code Quality Metrics
- - If sessions produce code, analyze quality
- - Check for test coverage mentions
- - Look for documentation updates
- - Track code review feedback
-
- ### 4. User Interaction Patterns
- - Analyze back-and-forth exchanges
- - Measure clarification request frequency
- - Track user guidance effectiveness
- - Identify optimal interaction patterns
-
- ### 5. Cross-Session Learning
- - Compare similar tasks across sessions
- - Identify improvement over time
- - Track recurring issues
- - Find evolving solution strategies
-
- **Record Experimental Results**:
- - Store strategy name and description
- - Record what was measured
- - Note insights discovered
- - Save to cache for future reference
-
- ## Data Collection per Session
-
- For each session, collect:
- - **Session ID**: Unique identifier
- - **Timestamp**: When the session occurred
- - **Task Type**: Category of task (bug fix, feature, refactor, etc.)
- - **Duration**: Time from start to completion
- - **Status**: Success, failure, abandoned, in-progress
- - **Loop Count**: Number of repetitive cycles detected
- - **Tool Usage**: List of tools used and their success
- - **Error Count**: Number of errors encountered
- - **Prompt Quality Score**: Assessed quality (1-10)
- - **Context Issues**: Boolean flag for confusion detected
- - **Notes**: Any notable observations
-
- ## Cache Memory Management
-
- ### Cache Structure
- ```
- /tmp/gh-aw/cache-memory/session-analysis/
- ├── history.json # Historical analysis results
- ├── strategies.json # Discovered analytical strategies
- └── patterns.json # Known behavioral patterns
- ```
-
- ### Initialize Cache
-
- If cache files don't exist, create them with initial structure:
- ```bash
- mkdir -p /tmp/gh-aw/cache-memory/session-analysis/
-
- cat > /tmp/gh-aw/cache-memory/session-analysis/history.json << 'EOF'
{
- "analyses": [],
- "last_updated": "YYYY-MM-DD",
- "version": "1.0"
- }
- EOF
- ```
-
- ### Update Historical Data
-
- Update cache memory with today's analysis:
- ```bash
- # Update history.json with today's results
- # Include: date, sessions_analyzed, completion_rate, average_duration_minutes
- # Include: experimental_strategy (if applicable), key_insights array
- ```
-
- ### Store Discovered Strategies
-
- If this was an experimental run, save the new strategy:
- - Strategy name and description
- - Results and effectiveness metrics
- - Save to strategies.json
-
- ### Update Pattern Database
-
- Add newly discovered patterns:
- - Pattern type and frequency
- - Correlation with success/failure
- - Save to patterns.json
-
- ### Maintain Cache Size
-
- Keep cache manageable:
- - Retain last 90 days of analysis history
- - Keep top 20 most effective strategies
- - Maintain comprehensive pattern database
-
- ## Insight Synthesis
-
- Aggregate observations across all analyzed sessions:
-
- ### Success Factors
-
- Identify patterns associated with successful completions:
- - Common prompt characteristics
- - Effective tool combinations
- - Optimal context provision
- - Successful error recovery strategies
- - Clear task descriptions
-
- **Example Analysis**:
- ```
- SUCCESS PATTERNS:
- - Sessions with specific file references: 85% success rate
- - Prompts including expected outcomes: 78% success rate
- - Tasks under 100 lines of change: 90% success rate
- ```
-
- ### Failure Signals
-
- Identify common indicators of confusion or inefficiency:
- - Vague or ambiguous prompts
- - Missing context clues
- - Circular reasoning patterns
- - Repeated failed attempts
- - Tool unavailability
-
- **Example Analysis**:
- ```
- FAILURE INDICATORS:
- - Prompts with "just fix it": 45% success rate
- - Missing file paths: 40% success rate
- - Tasks requiring >5 iterations: 30% success rate
- ```
-
- ### Prompt Quality Indicators
-
- Analyze what makes prompts effective:
- - Specific vs. general instructions
- - Context richness
- - Clear acceptance criteria
- - File/code references
- - Expected behavior descriptions
-
- **Categorize Prompts**:
- - **High Quality**: Specific, contextual, clear outcomes
- - **Medium Quality**: Some clarity but missing details
- - **Low Quality**: Vague, ambiguous, lacking context
-
- ## Recommendations Format
-
- Based on the analysis, generate actionable recommendations:
-
- 1. **For Users**: How to write better task descriptions
- 2. **For System**: Potential improvements to agent behavior
- 3. **For Tools**: Missing capabilities or integrations
-
- Include:
- - Prompt improvement templates
- - Best practice guidelines
- - Tool usage suggestions
- - Context provision tips
- - Error handling strategies
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/copilot-session-insights.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical session analysis data
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/session-insights` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/session-insights/*.json, memory/session-insights/*.jsonl, memory/session-insights/*.csv, memory/session-insights/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+
+ # Session Analysis Chart Generation
+
+ You are an expert at creating session analysis trend charts that reveal insights about Copilot agent session patterns over time.
+
+ ## 📊 Chart Generation Requirements
+
+ **IMPORTANT**: Generate exactly 2 trend charts that showcase Copilot agent session patterns over time.
+
+ ### Chart Generation Process
+
+ **Phase 1: Data Collection**
+
+ Collect data for the past 30 days (or available data) from cache memory and session logs:
+
+ 1. **Session Completion Data**:
+ - Count of sessions completed successfully per day
+ - Count of sessions failed/abandoned per day
+ - Completion rate percentage per day
+
+ 2. **Session Duration Data**:
+ - Average session duration per day (in minutes)
+ - Median session duration per day
+ - Number of sessions with loops/retries
+
+ **Phase 2: Data Preparation**
+
+ 1. Create CSV files in `/tmp/gh-aw/python/data/` with the collected data:
+ - `session_completion.csv` - Daily completion counts and rates
+ - `session_duration.csv` - Daily duration statistics
+
+ 2. Each CSV should have a date column and metric columns with appropriate headers
+
+ **Phase 3: Chart Generation**
+
+ Generate exactly **2 high-quality trend charts**:
+
+ **Chart 1: Session Completion Trends**
+ - Multi-line chart showing:
+ - Successful completions (line, green)
+ - Failed/abandoned sessions (line, red)
+ - Completion rate percentage (line with secondary y-axis)
+ - X-axis: Date (last 30 days)
+ - Y-axis: Count (left), Percentage (right)
+ - Save as: `/tmp/gh-aw/python/charts/session_completion_trends.png`
+
+ **Chart 2: Session Duration & Efficiency**
+ - Dual visualization showing:
+ - Average session duration (line)
+ - Median session duration (line)
+ - Sessions with loops (bar chart overlay)
+ - X-axis: Date (last 30 days)
+ - Y-axis: Duration in minutes
+ - Save as: `/tmp/gh-aw/python/charts/session_duration_trends.png`
+
+ **Chart Quality Requirements**:
+ - DPI: 300 minimum
+ - Figure size: 12x7 inches for better readability
+ - Use seaborn styling with a professional color palette
+ - Include grid lines for easier reading
+ - Clear, large labels and legend
+ - Title with context (e.g., "Session Completion Rates - Last 30 Days")
+ - Annotations for significant changes or anomalies
+
+ **Phase 4: Upload Charts**
+
+ 1. Upload both charts using the `upload asset` tool
+ 2. Collect the returned URLs for embedding in the discussion
+
+ **Phase 5: Embed Charts in Discussion**
+
+ Include the charts in your analysis report with this structure:
+
+ ```markdown
+ ## 📈 Session Trends Analysis
+
+ ### Completion Patterns
+ 
+
+ [Brief 2-3 sentence analysis of completion trends, highlighting improvements in success rates or concerning patterns]
+
+ ### Duration & Efficiency
+ 
+
+ [Brief 2-3 sentence analysis of session duration patterns, noting efficiency improvements or areas needing attention]
+ ```
+
+ ### Python Implementation Notes
+
+ - Use pandas for data manipulation and date handling
+ - Use matplotlib.pyplot and seaborn for visualization
+ - Set appropriate date formatters for x-axis labels
+ - Use `plt.xticks(rotation=45)` for readable date labels
+ - Apply `plt.tight_layout()` before saving
+ - Handle cases where data might be sparse or missing
+
+ ### Error Handling
+
+ If insufficient data is available (less than 7 days):
+ - Generate the charts with available data
+ - Add a note in the analysis mentioning the limited data range
+ - Consider using a bar chart instead of line chart for very sparse data
+
+ # Session Analysis Strategies
+
+ Comprehensive strategies for analyzing Copilot agent sessions to extract insights, identify patterns, and recommend improvements.
+
+ ## Standard Analysis Strategies
+
+ These strategies should be applied to every session analysis:
+
+ ### 1. Completion Analysis
+ - Did the session complete successfully?
+ - Was the task abandoned or aborted?
+ - Look for error messages or failure indicators
+ - Track completion rate
+
+ ### 2. Loop Detection
+ - Identify repetitive agent responses
+ - Detect circular reasoning or stuck patterns
+ - Count iteration loops without progress
+ - Flag sessions with excessive retries
+
+ ### 3. Prompt Structure Analysis
+ - Analyze task description clarity
+ - Identify effective prompt patterns
+ - Cluster prompts by keywords or structure
+ - Correlate prompt quality with success
+
+ ### 4. Context Confusion Detection
+ - Look for signs of missing context
+ - Identify requests for clarification
+ - Track contextual misunderstandings
+ - Note when agent asks for more information
+
+ ### 5. Error Recovery Analysis
+ - How does the agent handle errors?
+ - Track error types and recovery strategies
+ - Measure time to recover from failures
+ - Identify successful vs. failed recoveries
+
+ ### 6. Tool Usage Patterns
+ - Which tools are used most frequently?
+ - Are tools used effectively?
+ - Identify missing or unavailable tools
+ - Track tool execution success rates
+
+ ## Experimental Strategies (30% of runs)
+
+ **Determine if this is an experimental run**:
+ ```bash
+ # Generate random number between 0-100 using shell's RANDOM variable
+ # Note: Requires bash shell. On systems without bash, use: $(od -An -N1 -tu1 /dev/urandom | awk '{print $1}')
+ RANDOM_VALUE=$((RANDOM % 100))
+ # If value < 30, this is an experimental run
+ ```
+
+ **Novel Analysis Methods to Try** (rotate through these):
+
+ ### 1. Semantic Clustering
+ - Group prompts by semantic similarity
+ - Identify common themes across sessions
+ - Find outlier prompts that perform differently
+ - Use keyword extraction and comparison
+
+ ### 2. Temporal Analysis
+ - Analyze session duration patterns
+ - Identify time-of-day effects
+ - Track performance trends over time
+ - Correlate timing with success rates
+
+ ### 3. Code Quality Metrics
+ - If sessions produce code, analyze quality
+ - Check for test coverage mentions
+ - Look for documentation updates
+ - Track code review feedback
+
+ ### 4. User Interaction Patterns
+ - Analyze back-and-forth exchanges
+ - Measure clarification request frequency
+ - Track user guidance effectiveness
+ - Identify optimal interaction patterns
+
+ ### 5. Cross-Session Learning
+ - Compare similar tasks across sessions
+ - Identify improvement over time
+ - Track recurring issues
+ - Find evolving solution strategies
+
+ **Record Experimental Results**:
+ - Store strategy name and description
+ - Record what was measured
+ - Note insights discovered
+ - Save to cache for future reference
+
+ ## Data Collection per Session
+
+ For each session, collect:
+ - **Session ID**: Unique identifier
+ - **Timestamp**: When the session occurred
+ - **Task Type**: Category of task (bug fix, feature, refactor, etc.)
+ - **Duration**: Time from start to completion
+ - **Status**: Success, failure, abandoned, in-progress
+ - **Loop Count**: Number of repetitive cycles detected
+ - **Tool Usage**: List of tools used and their success
+ - **Error Count**: Number of errors encountered
+ - **Prompt Quality Score**: Assessed quality (1-10)
+ - **Context Issues**: Boolean flag for confusion detected
+ - **Notes**: Any notable observations
+
+ ## Cache Memory Management
+
+ ### Cache Structure
+ ```
+ /tmp/gh-aw/cache-memory/session-analysis/
+ ├── history.json # Historical analysis results
+ ├── strategies.json # Discovered analytical strategies
+ └── patterns.json # Known behavioral patterns
+ ```
+
+ ### Initialize Cache
+
+ If cache files don't exist, create them with initial structure:
+ ```bash
+ mkdir -p /tmp/gh-aw/cache-memory/session-analysis/
+
+ cat > /tmp/gh-aw/cache-memory/session-analysis/history.json << 'EOF'
+ {
+ "analyses": [],
+ "last_updated": "YYYY-MM-DD",
+ "version": "1.0"
+ }
+ EOF
+ ```
+
+ ### Update Historical Data
+
+ Update cache memory with today's analysis:
+ ```bash
+ # Update history.json with today's results
+ # Include: date, sessions_analyzed, completion_rate, average_duration_minutes
+ # Include: experimental_strategy (if applicable), key_insights array
+ ```
+
+ ### Store Discovered Strategies
+
+ If this was an experimental run, save the new strategy:
+ - Strategy name and description
+ - Results and effectiveness metrics
+ - Save to strategies.json
+
+ ### Update Pattern Database
+
+ Add newly discovered patterns:
+ - Pattern type and frequency
+ - Correlation with success/failure
+ - Save to patterns.json
+
+ ### Maintain Cache Size
+
+ Keep cache manageable:
+ - Retain last 90 days of analysis history
+ - Keep top 20 most effective strategies
+ - Maintain comprehensive pattern database
+
+ ## Insight Synthesis
+
+ Aggregate observations across all analyzed sessions:
+
+ ### Success Factors
+
+ Identify patterns associated with successful completions:
+ - Common prompt characteristics
+ - Effective tool combinations
+ - Optimal context provision
+ - Successful error recovery strategies
+ - Clear task descriptions
+
+ **Example Analysis**:
+ ```
+ SUCCESS PATTERNS:
+ - Sessions with specific file references: 85% success rate
+ - Prompts including expected outcomes: 78% success rate
+ - Tasks under 100 lines of change: 90% success rate
+ ```
+
+ ### Failure Signals
+
+ Identify common indicators of confusion or inefficiency:
+ - Vague or ambiguous prompts
+ - Missing context clues
+ - Circular reasoning patterns
+ - Repeated failed attempts
+ - Tool unavailability
+
+ **Example Analysis**:
+ ```
+ FAILURE INDICATORS:
+ - Prompts with "just fix it": 45% success rate
+ - Missing file paths: 40% success rate
+ - Tasks requiring >5 iterations: 30% success rate
+ ```
+
+ ### Prompt Quality Indicators
+
+ Analyze what makes prompts effective:
+ - Specific vs. general instructions
+ - Context richness
+ - Clear acceptance criteria
+ - File/code references
+ - Expected behavior descriptions
+
+ **Categorize Prompts**:
+ - **High Quality**: Specific, contextual, clear outcomes
+ - **Medium Quality**: Some clarity but missing details
+ - **Low Quality**: Vague, ambiguous, lacking context
+
+ ## Recommendations Format
+
+ Based on the analysis, generate actionable recommendations:
+
+ 1. **For Users**: How to write better task descriptions
+ 2. **For System**: Potential improvements to agent behavior
+ 3. **For Tools**: Missing capabilities or integrations
+
+ Include:
+ - Prompt improvement templates
+ - Best practice guidelines
+ - Tool usage suggestions
+ - Context provision tips
+ - Error handling strategies
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/copilot-session-insights.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/craft.lock.yml b/.github/workflows/craft.lock.yml
index f0cba4bd81..f26235cc64 100644
--- a/.github/workflows/craft.lock.yml
+++ b/.github/workflows/craft.lock.yml
@@ -543,65 +543,67 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/craft.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/craft.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml
index 4484b5e08b..6c10a5ae14 100644
--- a/.github/workflows/daily-assign-issue-to-user.lock.yml
+++ b/.github/workflows/daily-assign-issue-to-user.lock.yml
@@ -507,62 +507,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-assign-issue-to-user.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-assign-issue-to-user.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-choice-test.lock.yml b/.github/workflows/daily-choice-test.lock.yml
index 90062c414b..640947f30b 100644
--- a/.github/workflows/daily-choice-test.lock.yml
+++ b/.github/workflows/daily-choice-test.lock.yml
@@ -458,62 +458,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-choice-test.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-choice-test.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml
index 59abc20563..e9619187c1 100644
--- a/.github/workflows/daily-cli-performance.lock.yml
+++ b/.github/workflows/daily-cli-performance.lock.yml
@@ -679,179 +679,181 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical CLI compilation performance benchmark results
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/cli-performance` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/cli-performance/*.json, memory/cli-performance/*.jsonl, memory/cli-performance/*.txt
- - **Max File Size**: 512000 bytes (0.49 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- **IMPORTANT**: Always use the `safeinputs-go` and `safeinputs-make` tools for Go and Make commands instead of running them directly via bash. These safe-input tools provide consistent execution and proper logging.
-
- **Correct**:
- ```
- Use the safeinputs-go tool with args: "test ./..."
- Use the safeinputs-make tool with args: "build"
- Use the safeinputs-make tool with args: "lint"
- Use the safeinputs-make tool with args: "test-unit"
- ```
-
- **Incorrect**:
- ```
- Use the go safe-input tool with args: "test ./..." ❌ (Wrong tool name - use safeinputs-go)
- Run: go test ./... ❌ (Use safeinputs-go instead)
- Execute bash: make build ❌ (Use safeinputs-make instead)
- ```
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-cli-performance.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical CLI compilation performance benchmark results
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/cli-performance` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/cli-performance/*.json, memory/cli-performance/*.jsonl, memory/cli-performance/*.txt
+ - **Max File Size**: 512000 bytes (0.49 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ **IMPORTANT**: Always use the `safeinputs-go` and `safeinputs-make` tools for Go and Make commands instead of running them directly via bash. These safe-input tools provide consistent execution and proper logging.
+
+ **Correct**:
+ ```
+ Use the safeinputs-go tool with args: "test ./..."
+ Use the safeinputs-make tool with args: "build"
+ Use the safeinputs-make tool with args: "lint"
+ Use the safeinputs-make tool with args: "test-unit"
+ ```
+
+ **Incorrect**:
+ ```
+ Use the go safe-input tool with args: "test ./..." ❌ (Wrong tool name - use safeinputs-go)
+ Run: go test ./... ❌ (Use safeinputs-go instead)
+ Execute bash: make build ❌ (Use safeinputs-make instead)
+ ```
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-cli-performance.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml
index 482c8d7e66..0c522b74e4 100644
--- a/.github/workflows/daily-code-metrics.lock.yml
+++ b/.github/workflows/daily-code-metrics.lock.yml
@@ -558,581 +558,583 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical code quality and health metrics
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `daily/default` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: *.json, *.jsonl, *.csv, *.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- # Trends Visualization Guide
-
- You are an expert at creating compelling trend visualizations that reveal insights from data over time.
-
- ## Trending Chart Best Practices
-
- When generating trending charts, focus on:
-
- ### 1. **Time Series Excellence**
- - Use line charts for continuous trends over time
- - Add trend lines or moving averages to highlight patterns
- - Include clear date/time labels on the x-axis
- - Show confidence intervals or error bands when relevant
-
- ### 2. **Comparative Trends**
- - Use multi-line charts to compare multiple trends
- - Apply distinct colors for each series with a clear legend
- - Consider using area charts for stacked trends
- - Highlight key inflection points or anomalies
-
- ### 3. **Visual Impact**
- - Use vibrant, contrasting colors to make trends stand out
- - Add annotations for significant events or milestones
- - Include grid lines for easier value reading
- - Use appropriate scale (linear vs. logarithmic)
-
- ### 4. **Contextual Information**
- - Show percentage changes or growth rates
- - Include baseline comparisons (year-over-year, month-over-month)
- - Add summary statistics (min, max, average, median)
- - Highlight recent trends vs. historical patterns
-
- ## Example Trend Chart Types
-
- ### Temporal Trends
- ```python
- # Line chart with multiple trends
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- for column in data.columns:
- ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
- ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ### Growth Rates
- ```python
- # Bar chart showing period-over-period growth
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
- ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
- ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
- ax.set_ylabel('Growth %', fontsize=12)
- ```
-
- ### Moving Averages
- ```python
- # Trend with moving average overlay
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
- ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
- ax.fill_between(dates, values, moving_avg, alpha=0.2)
- ```
-
- ## Data Preparation for Trends
-
- ### Time-Based Indexing
- ```python
- # Convert to datetime and set as index
- data['date'] = pd.to_datetime(data['date'])
- data.set_index('date', inplace=True)
- data = data.sort_index()
- ```
-
- ### Resampling and Aggregation
- ```python
- # Resample daily data to weekly
- weekly_data = data.resample('W').mean()
-
- # Calculate rolling statistics
- data['rolling_mean'] = data['value'].rolling(window=7).mean()
- data['rolling_std'] = data['value'].rolling(window=7).std()
- ```
-
- ### Growth Calculations
- ```python
- # Calculate percentage change
- data['pct_change'] = data['value'].pct_change() * 100
-
- # Calculate year-over-year growth
- data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
- ```
-
- ## Color Palettes for Trends
-
- Use these palettes for impactful trend visualizations:
-
- - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
- - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
- - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
- - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
-
- ## Annotation Best Practices
-
- ```python
- # Annotate key points
- max_idx = data['value'].idxmax()
- max_val = data['value'].max()
- ax.annotate(f'Peak: {max_val:.2f}',
- xy=(max_idx, max_val),
- xytext=(10, 20),
- textcoords='offset points',
- arrowprops=dict(arrowstyle='->', color='red'),
- fontsize=10,
- fontweight='bold')
- ```
-
- ## Styling for Awesome Charts
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set professional style
- sns.set_style("whitegrid")
- sns.set_context("notebook", font_scale=1.2)
-
- # Custom color palette
- custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
- sns.set_palette(custom_colors)
-
- # Figure with optimal dimensions
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- # ... your plotting code ...
-
- # Tight layout for clean appearance
- plt.tight_layout()
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ## Tips for Trending Charts
-
- 1. **Start with the story**: What trend are you trying to show?
- 2. **Choose the right timeframe**: Match granularity to the pattern
- 3. **Smooth noise**: Use moving averages for volatile data
- 4. **Show context**: Include historical baselines or benchmarks
- 5. **Highlight insights**: Use annotations to draw attention
- 6. **Test readability**: Ensure labels and legends are clear
- 7. **Optimize colors**: Use colorblind-friendly palettes
- 8. **Export high quality**: Always use DPI 300+ for presentations
-
- ## Common Trend Patterns to Visualize
-
- - **Seasonal patterns**: Monthly or quarterly cycles
- - **Long-term growth**: Exponential or linear trends
- - **Volatility changes**: Periods of stability vs. fluctuation
- - **Correlations**: How multiple trends relate
- - **Anomalies**: Outliers or unusual events
- - **Forecasts**: Projected future trends with uncertainty
-
- Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-code-metrics.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical code quality and health metrics
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `daily/default` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: *.json, *.jsonl, *.csv, *.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ # Trends Visualization Guide
+
+ You are an expert at creating compelling trend visualizations that reveal insights from data over time.
+
+ ## Trending Chart Best Practices
+
+ When generating trending charts, focus on:
+
+ ### 1. **Time Series Excellence**
+ - Use line charts for continuous trends over time
+ - Add trend lines or moving averages to highlight patterns
+ - Include clear date/time labels on the x-axis
+ - Show confidence intervals or error bands when relevant
+
+ ### 2. **Comparative Trends**
+ - Use multi-line charts to compare multiple trends
+ - Apply distinct colors for each series with a clear legend
+ - Consider using area charts for stacked trends
+ - Highlight key inflection points or anomalies
+
+ ### 3. **Visual Impact**
+ - Use vibrant, contrasting colors to make trends stand out
+ - Add annotations for significant events or milestones
+ - Include grid lines for easier value reading
+ - Use appropriate scale (linear vs. logarithmic)
+
+ ### 4. **Contextual Information**
+ - Show percentage changes or growth rates
+ - Include baseline comparisons (year-over-year, month-over-month)
+ - Add summary statistics (min, max, average, median)
+ - Highlight recent trends vs. historical patterns
+
+ ## Example Trend Chart Types
+
+ ### Temporal Trends
+ ```python
+ # Line chart with multiple trends
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ for column in data.columns:
+ ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
+ ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ### Growth Rates
+ ```python
+ # Bar chart showing period-over-period growth
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
+ ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
+ ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
+ ax.set_ylabel('Growth %', fontsize=12)
+ ```
+
+ ### Moving Averages
+ ```python
+ # Trend with moving average overlay
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
+ ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
+ ax.fill_between(dates, values, moving_avg, alpha=0.2)
+ ```
+
+ ## Data Preparation for Trends
+
+ ### Time-Based Indexing
+ ```python
+ # Convert to datetime and set as index
+ data['date'] = pd.to_datetime(data['date'])
+ data.set_index('date', inplace=True)
+ data = data.sort_index()
+ ```
+
+ ### Resampling and Aggregation
+ ```python
+ # Resample daily data to weekly
+ weekly_data = data.resample('W').mean()
+
+ # Calculate rolling statistics
+ data['rolling_mean'] = data['value'].rolling(window=7).mean()
+ data['rolling_std'] = data['value'].rolling(window=7).std()
+ ```
+
+ ### Growth Calculations
+ ```python
+ # Calculate percentage change
+ data['pct_change'] = data['value'].pct_change() * 100
+
+ # Calculate year-over-year growth
+ data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
+ ```
+
+ ## Color Palettes for Trends
+
+ Use these palettes for impactful trend visualizations:
+
+ - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
+ - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
+ - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
+ - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
+
+ ## Annotation Best Practices
+
+ ```python
+ # Annotate key points
+ max_idx = data['value'].idxmax()
+ max_val = data['value'].max()
+ ax.annotate(f'Peak: {max_val:.2f}',
+ xy=(max_idx, max_val),
+ xytext=(10, 20),
+ textcoords='offset points',
+ arrowprops=dict(arrowstyle='->', color='red'),
+ fontsize=10,
+ fontweight='bold')
+ ```
+
+ ## Styling for Awesome Charts
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set professional style
+ sns.set_style("whitegrid")
+ sns.set_context("notebook", font_scale=1.2)
+
+ # Custom color palette
+ custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
+ sns.set_palette(custom_colors)
+
+ # Figure with optimal dimensions
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ # ... your plotting code ...
+
+ # Tight layout for clean appearance
+ plt.tight_layout()
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ## Tips for Trending Charts
+
+ 1. **Start with the story**: What trend are you trying to show?
+ 2. **Choose the right timeframe**: Match granularity to the pattern
+ 3. **Smooth noise**: Use moving averages for volatile data
+ 4. **Show context**: Include historical baselines or benchmarks
+ 5. **Highlight insights**: Use annotations to draw attention
+ 6. **Test readability**: Ensure labels and legends are clear
+ 7. **Optimize colors**: Use colorblind-friendly palettes
+ 8. **Export high quality**: Always use DPI 300+ for presentations
+
+ ## Common Trend Patterns to Visualize
+
+ - **Seasonal patterns**: Monthly or quarterly cycles
+ - **Long-term growth**: Exponential or linear trends
+ - **Volatility changes**: Periods of stability vs. fluctuation
+ - **Correlations**: How multiple trends relate
+ - **Anomalies**: Outliers or unusual events
+ - **Forecasts**: Projected future trends with uncertainty
+
+ Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-code-metrics.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml
index d6e59b7554..6219b34379 100644
--- a/.github/workflows/daily-compiler-quality.lock.yml
+++ b/.github/workflows/daily-compiler-quality.lock.yml
@@ -499,136 +499,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-compiler-quality.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-compiler-quality.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml
index d26ae3d14a..c3dc1fe2a0 100644
--- a/.github/workflows/daily-copilot-token-report.lock.yml
+++ b/.github/workflows/daily-copilot-token-report.lock.yml
@@ -568,409 +568,411 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical token consumption and cost data
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/token-metrics` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/token-metrics/*.json, memory/token-metrics/*.jsonl, memory/token-metrics/*.csv, memory/token-metrics/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-copilot-token-report.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical token consumption and cost data
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/token-metrics` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/token-metrics/*.json, memory/token-metrics/*.jsonl, memory/token-metrics/*.csv, memory/token-metrics/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-copilot-token-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml
index a8031557ea..9250e5116a 100644
--- a/.github/workflows/daily-doc-updater.lock.yml
+++ b/.github/workflows/daily-doc-updater.lock.yml
@@ -501,63 +501,65 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-doc-updater.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-doc-updater.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml
index da2dad04ca..14c3cd8de8 100644
--- a/.github/workflows/daily-fact.lock.yml
+++ b/.github/workflows/daily-fact.lock.yml
@@ -477,62 +477,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-fact.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-fact.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml
index 5ae2ba7433..6c9fe498b1 100644
--- a/.github/workflows/daily-file-diet.lock.yml
+++ b/.github/workflows/daily-file-diet.lock.yml
@@ -512,137 +512,139 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-file-diet.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-file-diet.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml
index 09e13b5dc1..a60b39e697 100644
--- a/.github/workflows/daily-firewall-report.lock.yml
+++ b/.github/workflows/daily-firewall-report.lock.yml
@@ -582,180 +582,182 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Python Environment Ready
-
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
- Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
-
- ## Store Historical Data (JSON Lines)
-
- ```python
- import json
- from datetime import datetime
-
- # Append data point
- with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
- f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
- ```
-
- ## Generate Charts
-
- ```python
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- df = pd.read_json('history.jsonl', lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
-
- sns.set_style("whitegrid")
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
- ax.set_title('Trend', fontsize=16, fontweight='bold')
- plt.xticks(rotation=45)
- plt.tight_layout()
- plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
- ```
-
- ## Best Practices
-
- - Use JSON Lines (`.jsonl`) for append-only storage
- - Include ISO 8601 timestamps in all data points
- - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
- - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-firewall-report.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Python Environment Ready
+
+ Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
+ Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
+
+ ## Store Historical Data (JSON Lines)
+
+ ```python
+ import json
+ from datetime import datetime
+
+ # Append data point
+ with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
+ f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
+ ```
+
+ ## Generate Charts
+
+ ```python
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ df = pd.read_json('history.jsonl', lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+
+ sns.set_style("whitegrid")
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
+ ax.set_title('Trend', fontsize=16, fontweight='bold')
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+ plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ## Best Practices
+
+ - Use JSON Lines (`.jsonl`) for append-only storage
+ - Include ISO 8601 timestamps in all data points
+ - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
+ - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-firewall-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-issues-report.lock.yml b/.github/workflows/daily-issues-report.lock.yml
index 2b166a1f84..2048eab76a 100644
--- a/.github/workflows/daily-issues-report.lock.yml
+++ b/.github/workflows/daily-issues-report.lock.yml
@@ -644,729 +644,731 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
-
- ## Issues Data
-
- Pre-fetched issues data is available at `/tmp/gh-aw/issues-data/issues.json` containing up to 1000 issues (open and closed).
-
- ### Schema
-
- The issues data structure is:
-
- ```json
- [
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
{
- "number": "number",
- "title": "string",
- "state": "string",
- "url": "string",
- "body": "string",
- "createdAt": "string",
- "updatedAt": "string",
- "closedAt": "string",
- "author": {
- "id": "string",
- "login": "string",
- "name": "string"
- },
- "assignees": [
- {
- "id": "string",
- "login": "string",
- "name": "string"
- }
- ],
- "labels": [
- {
- "id": "string",
- "name": "string",
- "color": "string",
- "description": "string"
- }
- ],
- "milestone": {
- "id": "string",
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+
+ ## Issues Data
+
+ Pre-fetched issues data is available at `/tmp/gh-aw/issues-data/issues.json` containing up to 1000 issues (open and closed).
+
+ ### Schema
+
+ The issues data structure is:
+
+ ```json
+ [
+ {
"number": "number",
"title": "string",
- "description": "string",
- "dueOn": "string"
- },
- "comments": [
- {
+ "state": "string",
+ "url": "string",
+ "body": "string",
+ "createdAt": "string",
+ "updatedAt": "string",
+ "closedAt": "string",
+ "author": {
"id": "string",
- "url": "string",
- "body": "string",
- "createdAt": "string",
- "author": {
+ "login": "string",
+ "name": "string"
+ },
+ "assignees": [
+ {
"id": "string",
"login": "string",
"name": "string"
}
- }
- ]
- }
- ]
- ```
-
- ### Usage Examples
-
- ```bash
- # Get total number of issues
- jq 'length' /tmp/gh-aw/issues-data/issues.json
-
- # Get only open issues
- jq '[.[] | select(.state == "OPEN")]' /tmp/gh-aw/issues-data/issues.json
-
- # Get issues from the last 7 days (cross-platform: GNU date first, BSD fallback)
- DATE_7_DAYS_AGO=$(date -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-7d '+%Y-%m-%dT%H:%M:%SZ')
- jq --arg date "$DATE_7_DAYS_AGO" '[.[] | select(.createdAt >= $date)]' /tmp/gh-aw/issues-data/issues.json
-
- # Get issue numbers
- jq '[.[].number]' /tmp/gh-aw/issues-data/issues.json
-
- # Get issues with specific label
- jq '[.[] | select(.labels | any(.name == "bug"))]' /tmp/gh-aw/issues-data/issues.json
- ```
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- # Trends Visualization Guide
-
- You are an expert at creating compelling trend visualizations that reveal insights from data over time.
-
- ## Trending Chart Best Practices
-
- When generating trending charts, focus on:
-
- ### 1. **Time Series Excellence**
- - Use line charts for continuous trends over time
- - Add trend lines or moving averages to highlight patterns
- - Include clear date/time labels on the x-axis
- - Show confidence intervals or error bands when relevant
-
- ### 2. **Comparative Trends**
- - Use multi-line charts to compare multiple trends
- - Apply distinct colors for each series with a clear legend
- - Consider using area charts for stacked trends
- - Highlight key inflection points or anomalies
-
- ### 3. **Visual Impact**
- - Use vibrant, contrasting colors to make trends stand out
- - Add annotations for significant events or milestones
- - Include grid lines for easier value reading
- - Use appropriate scale (linear vs. logarithmic)
-
- ### 4. **Contextual Information**
- - Show percentage changes or growth rates
- - Include baseline comparisons (year-over-year, month-over-month)
- - Add summary statistics (min, max, average, median)
- - Highlight recent trends vs. historical patterns
-
- ## Example Trend Chart Types
-
- ### Temporal Trends
- ```python
- # Line chart with multiple trends
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- for column in data.columns:
- ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
- ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ### Growth Rates
- ```python
- # Bar chart showing period-over-period growth
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
- ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
- ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
- ax.set_ylabel('Growth %', fontsize=12)
- ```
-
- ### Moving Averages
- ```python
- # Trend with moving average overlay
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
- ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
- ax.fill_between(dates, values, moving_avg, alpha=0.2)
- ```
-
- ## Data Preparation for Trends
-
- ### Time-Based Indexing
- ```python
- # Convert to datetime and set as index
- data['date'] = pd.to_datetime(data['date'])
- data.set_index('date', inplace=True)
- data = data.sort_index()
- ```
-
- ### Resampling and Aggregation
- ```python
- # Resample daily data to weekly
- weekly_data = data.resample('W').mean()
-
- # Calculate rolling statistics
- data['rolling_mean'] = data['value'].rolling(window=7).mean()
- data['rolling_std'] = data['value'].rolling(window=7).std()
- ```
-
- ### Growth Calculations
- ```python
- # Calculate percentage change
- data['pct_change'] = data['value'].pct_change() * 100
-
- # Calculate year-over-year growth
- data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
- ```
-
- ## Color Palettes for Trends
-
- Use these palettes for impactful trend visualizations:
-
- - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
- - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
- - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
- - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
-
- ## Annotation Best Practices
-
- ```python
- # Annotate key points
- max_idx = data['value'].idxmax()
- max_val = data['value'].max()
- ax.annotate(f'Peak: {max_val:.2f}',
- xy=(max_idx, max_val),
- xytext=(10, 20),
- textcoords='offset points',
- arrowprops=dict(arrowstyle='->', color='red'),
- fontsize=10,
- fontweight='bold')
- ```
-
- ## Styling for Awesome Charts
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set professional style
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- sns.set_style("whitegrid")
- sns.set_context("notebook", font_scale=1.2)
-
- # Custom color palette
- custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
- sns.set_palette(custom_colors)
-
- # Figure with optimal dimensions
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- # ... your plotting code ...
-
- # Tight layout for clean appearance
- plt.tight_layout()
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ## Tips for Trending Charts
-
- 1. **Start with the story**: What trend are you trying to show?
- 2. **Choose the right timeframe**: Match granularity to the pattern
- 3. **Smooth noise**: Use moving averages for volatile data
- 4. **Show context**: Include historical baselines or benchmarks
- 5. **Highlight insights**: Use annotations to draw attention
- 6. **Test readability**: Ensure labels and legends are clear
- 7. **Optimize colors**: Use colorblind-friendly palettes
- 8. **Export high quality**: Always use DPI 300+ for presentations
-
- ## Common Trend Patterns to Visualize
-
- - **Seasonal patterns**: Monthly or quarterly cycles
- - **Long-term growth**: Exponential or linear trends
- - **Volatility changes**: Periods of stability vs. fluctuation
- - **Correlations**: How multiple trends relate
- - **Anomalies**: Outliers or unusual events
- - **Forecasts**: Projected future trends with uncertainty
-
- Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-issues-report.md}}
- PROMPT_EOF
+ ],
+ "labels": [
+ {
+ "id": "string",
+ "name": "string",
+ "color": "string",
+ "description": "string"
+ }
+ ],
+ "milestone": {
+ "id": "string",
+ "number": "number",
+ "title": "string",
+ "description": "string",
+ "dueOn": "string"
+ },
+ "comments": [
+ {
+ "id": "string",
+ "url": "string",
+ "body": "string",
+ "createdAt": "string",
+ "author": {
+ "id": "string",
+ "login": "string",
+ "name": "string"
+ }
+ }
+ ]
+ }
+ ]
+ ```
+
+ ### Usage Examples
+
+ ```bash
+ # Get total number of issues
+ jq 'length' /tmp/gh-aw/issues-data/issues.json
+
+ # Get only open issues
+ jq '[.[] | select(.state == "OPEN")]' /tmp/gh-aw/issues-data/issues.json
+
+ # Get issues from the last 7 days (cross-platform: GNU date first, BSD fallback)
+ DATE_7_DAYS_AGO=$(date -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-7d '+%Y-%m-%dT%H:%M:%SZ')
+ jq --arg date "$DATE_7_DAYS_AGO" '[.[] | select(.createdAt >= $date)]' /tmp/gh-aw/issues-data/issues.json
+
+ # Get issue numbers
+ jq '[.[].number]' /tmp/gh-aw/issues-data/issues.json
+
+ # Get issues with specific label
+ jq '[.[] | select(.labels | any(.name == "bug"))]' /tmp/gh-aw/issues-data/issues.json
+ ```
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ # Trends Visualization Guide
+
+ You are an expert at creating compelling trend visualizations that reveal insights from data over time.
+
+ ## Trending Chart Best Practices
+
+ When generating trending charts, focus on:
+
+ ### 1. **Time Series Excellence**
+ - Use line charts for continuous trends over time
+ - Add trend lines or moving averages to highlight patterns
+ - Include clear date/time labels on the x-axis
+ - Show confidence intervals or error bands when relevant
+
+ ### 2. **Comparative Trends**
+ - Use multi-line charts to compare multiple trends
+ - Apply distinct colors for each series with a clear legend
+ - Consider using area charts for stacked trends
+ - Highlight key inflection points or anomalies
+
+ ### 3. **Visual Impact**
+ - Use vibrant, contrasting colors to make trends stand out
+ - Add annotations for significant events or milestones
+ - Include grid lines for easier value reading
+ - Use appropriate scale (linear vs. logarithmic)
+
+ ### 4. **Contextual Information**
+ - Show percentage changes or growth rates
+ - Include baseline comparisons (year-over-year, month-over-month)
+ - Add summary statistics (min, max, average, median)
+ - Highlight recent trends vs. historical patterns
+
+ ## Example Trend Chart Types
+
+ ### Temporal Trends
+ ```python
+ # Line chart with multiple trends
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ for column in data.columns:
+ ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
+ ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ### Growth Rates
+ ```python
+ # Bar chart showing period-over-period growth
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
+ ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
+ ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
+ ax.set_ylabel('Growth %', fontsize=12)
+ ```
+
+ ### Moving Averages
+ ```python
+ # Trend with moving average overlay
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
+ ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
+ ax.fill_between(dates, values, moving_avg, alpha=0.2)
+ ```
+
+ ## Data Preparation for Trends
+
+ ### Time-Based Indexing
+ ```python
+ # Convert to datetime and set as index
+ data['date'] = pd.to_datetime(data['date'])
+ data.set_index('date', inplace=True)
+ data = data.sort_index()
+ ```
+
+ ### Resampling and Aggregation
+ ```python
+ # Resample daily data to weekly
+ weekly_data = data.resample('W').mean()
+
+ # Calculate rolling statistics
+ data['rolling_mean'] = data['value'].rolling(window=7).mean()
+ data['rolling_std'] = data['value'].rolling(window=7).std()
+ ```
+
+ ### Growth Calculations
+ ```python
+ # Calculate percentage change
+ data['pct_change'] = data['value'].pct_change() * 100
+
+ # Calculate year-over-year growth
+ data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
+ ```
+
+ ## Color Palettes for Trends
+
+ Use these palettes for impactful trend visualizations:
+
+ - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
+ - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
+ - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
+ - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
+
+ ## Annotation Best Practices
+
+ ```python
+ # Annotate key points
+ max_idx = data['value'].idxmax()
+ max_val = data['value'].max()
+ ax.annotate(f'Peak: {max_val:.2f}',
+ xy=(max_idx, max_val),
+ xytext=(10, 20),
+ textcoords='offset points',
+ arrowprops=dict(arrowstyle='->', color='red'),
+ fontsize=10,
+ fontweight='bold')
+ ```
+
+ ## Styling for Awesome Charts
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set professional style
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ sns.set_style("whitegrid")
+ sns.set_context("notebook", font_scale=1.2)
+
+ # Custom color palette
+ custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
+ sns.set_palette(custom_colors)
+
+ # Figure with optimal dimensions
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ # ... your plotting code ...
+
+ # Tight layout for clean appearance
+ plt.tight_layout()
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ## Tips for Trending Charts
+
+ 1. **Start with the story**: What trend are you trying to show?
+ 2. **Choose the right timeframe**: Match granularity to the pattern
+ 3. **Smooth noise**: Use moving averages for volatile data
+ 4. **Show context**: Include historical baselines or benchmarks
+ 5. **Highlight insights**: Use annotations to draw attention
+ 6. **Test readability**: Ensure labels and legends are clear
+ 7. **Optimize colors**: Use colorblind-friendly palettes
+ 8. **Export high quality**: Always use DPI 300+ for presentations
+
+ ## Common Trend Patterns to Visualize
+
+ - **Seasonal patterns**: Monthly or quarterly cycles
+ - **Long-term growth**: Exponential or linear trends
+ - **Volatility changes**: Periods of stability vs. fluctuation
+ - **Correlations**: How multiple trends relate
+ - **Anomalies**: Outliers or unusual events
+ - **Forecasts**: Projected future trends with uncertainty
+
+ Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-issues-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml
index 090b61b1db..dcaf093642 100644
--- a/.github/workflows/daily-malicious-code-scan.lock.yml
+++ b/.github/workflows/daily-malicious-code-scan.lock.yml
@@ -521,135 +521,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-malicious-code-scan.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-malicious-code-scan.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml
index fa7bc5cc1e..4d6406611d 100644
--- a/.github/workflows/daily-multi-device-docs-tester.lock.yml
+++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml
@@ -557,198 +557,200 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/playwright_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Starting the Documentation Preview Server
-
- **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build.
-
- Navigate to the docs directory and start the preview server in the background:
-
- ```bash
- cd docs
- npm run preview > /tmp/preview.log 2>&1 &
- echo $! > /tmp/server.pid
- ```
-
- This will:
- - Start the preview server on port 4321
- - Redirect output to `/tmp/preview.log`
- - Save the process ID to `/tmp/server.pid` for later cleanup
-
- ## Waiting for Server Readiness
-
- Poll the server with curl to ensure it's ready before use:
-
- ```bash
- for i in {1..30}; do
- curl -s http://localhost:4321 > /dev/null && echo "Server ready!" && break
- echo "Waiting for server... ($i/30)" && sleep 2
- done
- ```
-
- This will:
- - Attempt to connect up to 30 times (60 seconds total)
- - Wait 2 seconds between attempts
- - Exit successfully when server responds
-
- ## Verifying Server Accessibility (Optional)
-
- Optionally verify the server is serving content:
-
- ```bash
- curl -s http://localhost:4321/gh-aw/ | head -20
- ```
-
- ## Stopping the Documentation Server
-
- After you're done using the server, clean up the process:
-
- ```bash
- kill $(cat /tmp/server.pid) 2>/dev/null || true
- rm -f /tmp/server.pid /tmp/preview.log
- ```
-
- This will:
- - Kill the server process using the saved PID
- - Remove temporary files
- - Ignore errors if the process already stopped
-
- ## Usage Notes
-
- - The server runs on `http://localhost:4321`
- - Documentation is accessible at `http://localhost:4321/gh-aw/`
- - Always clean up the server when done to avoid orphan processes
- - If the server fails to start, check `/tmp/preview.log` for errors
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-multi-device-docs-tester.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/playwright_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Starting the Documentation Preview Server
+
+ **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build.
+
+ Navigate to the docs directory and start the preview server in the background:
+
+ ```bash
+ cd docs
+ npm run preview > /tmp/preview.log 2>&1 &
+ echo $! > /tmp/server.pid
+ ```
+
+ This will:
+ - Start the preview server on port 4321
+ - Redirect output to `/tmp/preview.log`
+ - Save the process ID to `/tmp/server.pid` for later cleanup
+
+ ## Waiting for Server Readiness
+
+ Poll the server with curl to ensure it's ready before use:
+
+ ```bash
+ for i in {1..30}; do
+ curl -s http://localhost:4321 > /dev/null && echo "Server ready!" && break
+ echo "Waiting for server... ($i/30)" && sleep 2
+ done
+ ```
+
+ This will:
+ - Attempt to connect up to 30 times (60 seconds total)
+ - Wait 2 seconds between attempts
+ - Exit successfully when server responds
+
+ ## Verifying Server Accessibility (Optional)
+
+ Optionally verify the server is serving content:
+
+ ```bash
+ curl -s http://localhost:4321/gh-aw/ | head -20
+ ```
+
+ ## Stopping the Documentation Server
+
+ After you're done using the server, clean up the process:
+
+ ```bash
+ kill $(cat /tmp/server.pid) 2>/dev/null || true
+ rm -f /tmp/server.pid /tmp/preview.log
+ ```
+
+ This will:
+ - Kill the server process using the saved PID
+ - Remove temporary files
+ - Ignore errors if the process already stopped
+
+ ## Usage Notes
+
+ - The server runs on `http://localhost:4321`
+ - Documentation is accessible at `http://localhost:4321/gh-aw/`
+ - Always clean up the server when done to avoid orphan processes
+ - If the server fails to start, check `/tmp/preview.log` for errors
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-multi-device-docs-tester.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml
index 1d4a51ba6a..3db38f3ba5 100644
--- a/.github/workflows/daily-news.lock.yml
+++ b/.github/workflows/daily-news.lock.yml
@@ -639,671 +639,673 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical news digest data
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/daily-news` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/daily-news/*.json, memory/daily-news/*.jsonl, memory/daily-news/*.csv, memory/daily-news/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Trends Visualization Guide
-
- You are an expert at creating compelling trend visualizations that reveal insights from data over time.
-
- ## Trending Chart Best Practices
-
- When generating trending charts, focus on:
-
- ### 1. **Time Series Excellence**
- - Use line charts for continuous trends over time
- - Add trend lines or moving averages to highlight patterns
- - Include clear date/time labels on the x-axis
- - Show confidence intervals or error bands when relevant
-
- ### 2. **Comparative Trends**
- - Use multi-line charts to compare multiple trends
- - Apply distinct colors for each series with a clear legend
- - Consider using area charts for stacked trends
- - Highlight key inflection points or anomalies
-
- ### 3. **Visual Impact**
- - Use vibrant, contrasting colors to make trends stand out
- - Add annotations for significant events or milestones
- - Include grid lines for easier value reading
- - Use appropriate scale (linear vs. logarithmic)
-
- ### 4. **Contextual Information**
- - Show percentage changes or growth rates
- - Include baseline comparisons (year-over-year, month-over-month)
- - Add summary statistics (min, max, average, median)
- - Highlight recent trends vs. historical patterns
-
- ## Example Trend Chart Types
-
- ### Temporal Trends
- ```python
- # Line chart with multiple trends
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- for column in data.columns:
- ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
- ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ### Growth Rates
- ```python
- # Bar chart showing period-over-period growth
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
- ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
- ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
- ax.set_ylabel('Growth %', fontsize=12)
- ```
-
- ### Moving Averages
- ```python
- # Trend with moving average overlay
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
- ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
- ax.fill_between(dates, values, moving_avg, alpha=0.2)
- ```
-
- ## Data Preparation for Trends
-
- ### Time-Based Indexing
- ```python
- # Convert to datetime and set as index
- data['date'] = pd.to_datetime(data['date'])
- data.set_index('date', inplace=True)
- data = data.sort_index()
- ```
-
- ### Resampling and Aggregation
- ```python
- # Resample daily data to weekly
- weekly_data = data.resample('W').mean()
-
- # Calculate rolling statistics
- data['rolling_mean'] = data['value'].rolling(window=7).mean()
- data['rolling_std'] = data['value'].rolling(window=7).std()
- ```
-
- ### Growth Calculations
- ```python
- # Calculate percentage change
- data['pct_change'] = data['value'].pct_change() * 100
-
- # Calculate year-over-year growth
- data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
- ```
-
- ## Color Palettes for Trends
-
- Use these palettes for impactful trend visualizations:
-
- - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
- - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
- - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
- - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
-
- ## Annotation Best Practices
-
- ```python
- # Annotate key points
- max_idx = data['value'].idxmax()
- max_val = data['value'].max()
- ax.annotate(f'Peak: {max_val:.2f}',
- xy=(max_idx, max_val),
- xytext=(10, 20),
- textcoords='offset points',
- arrowprops=dict(arrowstyle='->', color='red'),
- fontsize=10,
- fontweight='bold')
- ```
-
- ## Styling for Awesome Charts
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set professional style
- sns.set_style("whitegrid")
- sns.set_context("notebook", font_scale=1.2)
-
- # Custom color palette
- custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
- sns.set_palette(custom_colors)
-
- # Figure with optimal dimensions
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- # ... your plotting code ...
-
- # Tight layout for clean appearance
- plt.tight_layout()
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ## Tips for Trending Charts
-
- 1. **Start with the story**: What trend are you trying to show?
- 2. **Choose the right timeframe**: Match granularity to the pattern
- 3. **Smooth noise**: Use moving averages for volatile data
- 4. **Show context**: Include historical baselines or benchmarks
- 5. **Highlight insights**: Use annotations to draw attention
- 6. **Test readability**: Ensure labels and legends are clear
- 7. **Optimize colors**: Use colorblind-friendly palettes
- 8. **Export high quality**: Always use DPI 300+ for presentations
-
- ## Common Trend Patterns to Visualize
-
- - **Seasonal patterns**: Monthly or quarterly cycles
- - **Long-term growth**: Exponential or linear trends
- - **Volatility changes**: Periods of stability vs. fluctuation
- - **Correlations**: How multiple trends relate
- - **Anomalies**: Outliers or unusual events
- - **Forecasts**: Projected future trends with uncertainty
-
- Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-news.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Historical news digest data
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/daily-news` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/daily-news/*.json, memory/daily-news/*.jsonl, memory/daily-news/*.csv, memory/daily-news/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Trends Visualization Guide
+
+ You are an expert at creating compelling trend visualizations that reveal insights from data over time.
+
+ ## Trending Chart Best Practices
+
+ When generating trending charts, focus on:
+
+ ### 1. **Time Series Excellence**
+ - Use line charts for continuous trends over time
+ - Add trend lines or moving averages to highlight patterns
+ - Include clear date/time labels on the x-axis
+ - Show confidence intervals or error bands when relevant
+
+ ### 2. **Comparative Trends**
+ - Use multi-line charts to compare multiple trends
+ - Apply distinct colors for each series with a clear legend
+ - Consider using area charts for stacked trends
+ - Highlight key inflection points or anomalies
+
+ ### 3. **Visual Impact**
+ - Use vibrant, contrasting colors to make trends stand out
+ - Add annotations for significant events or milestones
+ - Include grid lines for easier value reading
+ - Use appropriate scale (linear vs. logarithmic)
+
+ ### 4. **Contextual Information**
+ - Show percentage changes or growth rates
+ - Include baseline comparisons (year-over-year, month-over-month)
+ - Add summary statistics (min, max, average, median)
+ - Highlight recent trends vs. historical patterns
+
+ ## Example Trend Chart Types
+
+ ### Temporal Trends
+ ```python
+ # Line chart with multiple trends
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ for column in data.columns:
+ ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
+ ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ### Growth Rates
+ ```python
+ # Bar chart showing period-over-period growth
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
+ ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
+ ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
+ ax.set_ylabel('Growth %', fontsize=12)
+ ```
+
+ ### Moving Averages
+ ```python
+ # Trend with moving average overlay
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
+ ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
+ ax.fill_between(dates, values, moving_avg, alpha=0.2)
+ ```
+
+ ## Data Preparation for Trends
+
+ ### Time-Based Indexing
+ ```python
+ # Convert to datetime and set as index
+ data['date'] = pd.to_datetime(data['date'])
+ data.set_index('date', inplace=True)
+ data = data.sort_index()
+ ```
+
+ ### Resampling and Aggregation
+ ```python
+ # Resample daily data to weekly
+ weekly_data = data.resample('W').mean()
+
+ # Calculate rolling statistics
+ data['rolling_mean'] = data['value'].rolling(window=7).mean()
+ data['rolling_std'] = data['value'].rolling(window=7).std()
+ ```
+
+ ### Growth Calculations
+ ```python
+ # Calculate percentage change
+ data['pct_change'] = data['value'].pct_change() * 100
+
+ # Calculate year-over-year growth
+ data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
+ ```
+
+ ## Color Palettes for Trends
+
+ Use these palettes for impactful trend visualizations:
+
+ - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
+ - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
+ - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
+ - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
+
+ ## Annotation Best Practices
+
+ ```python
+ # Annotate key points
+ max_idx = data['value'].idxmax()
+ max_val = data['value'].max()
+ ax.annotate(f'Peak: {max_val:.2f}',
+ xy=(max_idx, max_val),
+ xytext=(10, 20),
+ textcoords='offset points',
+ arrowprops=dict(arrowstyle='->', color='red'),
+ fontsize=10,
+ fontweight='bold')
+ ```
+
+ ## Styling for Awesome Charts
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set professional style
+ sns.set_style("whitegrid")
+ sns.set_context("notebook", font_scale=1.2)
+
+ # Custom color palette
+ custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
+ sns.set_palette(custom_colors)
+
+ # Figure with optimal dimensions
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ # ... your plotting code ...
+
+ # Tight layout for clean appearance
+ plt.tight_layout()
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ## Tips for Trending Charts
+
+ 1. **Start with the story**: What trend are you trying to show?
+ 2. **Choose the right timeframe**: Match granularity to the pattern
+ 3. **Smooth noise**: Use moving averages for volatile data
+ 4. **Show context**: Include historical baselines or benchmarks
+ 5. **Highlight insights**: Use annotations to draw attention
+ 6. **Test readability**: Ensure labels and legends are clear
+ 7. **Optimize colors**: Use colorblind-friendly palettes
+ 8. **Export high quality**: Always use DPI 300+ for presentations
+
+ ## Common Trend Patterns to Visualize
+
+ - **Seasonal patterns**: Monthly or quarterly cycles
+ - **Long-term growth**: Exponential or linear trends
+ - **Volatility changes**: Periods of stability vs. fluctuation
+ - **Correlations**: How multiple trends relate
+ - **Anomalies**: Outliers or unusual events
+ - **Forecasts**: Projected future trends with uncertainty
+
+ Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-news.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-observability-report.lock.yml b/.github/workflows/daily-observability-report.lock.yml
index ec171ed981..57aad16954 100644
--- a/.github/workflows/daily-observability-report.lock.yml
+++ b/.github/workflows/daily-observability-report.lock.yml
@@ -611,135 +611,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-observability-report.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-observability-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml
index 8f84825508..5090c04232 100644
--- a/.github/workflows/daily-performance-summary.lock.yml
+++ b/.github/workflows/daily-performance-summary.lock.yml
@@ -1105,180 +1105,182 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- # Python Environment Ready
-
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
- Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
-
- ## Store Historical Data (JSON Lines)
-
- ```python
- import json
- from datetime import datetime
-
- # Append data point
- with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
- f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
- ```
-
- ## Generate Charts
-
- ```python
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- df = pd.read_json('history.jsonl', lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
-
- sns.set_style("whitegrid")
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
- ax.set_title('Trend', fontsize=16, fontweight='bold')
- plt.xticks(rotation=45)
- plt.tight_layout()
- plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
- ```
-
- ## Best Practices
-
- - Use JSON Lines (`.jsonl`) for append-only storage
- - Include ISO 8601 timestamps in all data points
- - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
- - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-performance-summary.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ # Python Environment Ready
+
+ Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
+ Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
+
+ ## Store Historical Data (JSON Lines)
+
+ ```python
+ import json
+ from datetime import datetime
+
+ # Append data point
+ with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
+ f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
+ ```
+
+ ## Generate Charts
+
+ ```python
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ df = pd.read_json('history.jsonl', lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+
+ sns.set_style("whitegrid")
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
+ ax.set_title('Trend', fontsize=16, fontweight='bold')
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+ plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ## Best Practices
+
+ - Use JSON Lines (`.jsonl`) for append-only storage
+ - Include ISO 8601 timestamps in all data points
+ - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
+ - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-performance-summary.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml
index bb40fcd04c..d8006c3504 100644
--- a/.github/workflows/daily-regulatory.lock.yml
+++ b/.github/workflows/daily-regulatory.lock.yml
@@ -1005,137 +1005,139 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-regulatory.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-regulatory.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml
index 47d3e36d41..16fee64bf1 100644
--- a/.github/workflows/daily-repo-chronicle.lock.yml
+++ b/.github/workflows/daily-repo-chronicle.lock.yml
@@ -545,556 +545,558 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- # Trends Visualization Guide
-
- You are an expert at creating compelling trend visualizations that reveal insights from data over time.
-
- ## Trending Chart Best Practices
-
- When generating trending charts, focus on:
-
- ### 1. **Time Series Excellence**
- - Use line charts for continuous trends over time
- - Add trend lines or moving averages to highlight patterns
- - Include clear date/time labels on the x-axis
- - Show confidence intervals or error bands when relevant
-
- ### 2. **Comparative Trends**
- - Use multi-line charts to compare multiple trends
- - Apply distinct colors for each series with a clear legend
- - Consider using area charts for stacked trends
- - Highlight key inflection points or anomalies
-
- ### 3. **Visual Impact**
- - Use vibrant, contrasting colors to make trends stand out
- - Add annotations for significant events or milestones
- - Include grid lines for easier value reading
- - Use appropriate scale (linear vs. logarithmic)
-
- ### 4. **Contextual Information**
- - Show percentage changes or growth rates
- - Include baseline comparisons (year-over-year, month-over-month)
- - Add summary statistics (min, max, average, median)
- - Highlight recent trends vs. historical patterns
-
- ## Example Trend Chart Types
-
- ### Temporal Trends
- ```python
- # Line chart with multiple trends
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- for column in data.columns:
- ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
- ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ### Growth Rates
- ```python
- # Bar chart showing period-over-period growth
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
- ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
- ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
- ax.set_ylabel('Growth %', fontsize=12)
- ```
-
- ### Moving Averages
- ```python
- # Trend with moving average overlay
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
- ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
- ax.fill_between(dates, values, moving_avg, alpha=0.2)
- ```
-
- ## Data Preparation for Trends
-
- ### Time-Based Indexing
- ```python
- # Convert to datetime and set as index
- data['date'] = pd.to_datetime(data['date'])
- data.set_index('date', inplace=True)
- data = data.sort_index()
- ```
-
- ### Resampling and Aggregation
- ```python
- # Resample daily data to weekly
- weekly_data = data.resample('W').mean()
-
- # Calculate rolling statistics
- data['rolling_mean'] = data['value'].rolling(window=7).mean()
- data['rolling_std'] = data['value'].rolling(window=7).std()
- ```
-
- ### Growth Calculations
- ```python
- # Calculate percentage change
- data['pct_change'] = data['value'].pct_change() * 100
-
- # Calculate year-over-year growth
- data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
- ```
-
- ## Color Palettes for Trends
-
- Use these palettes for impactful trend visualizations:
-
- - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
- - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
- - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
- - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
-
- ## Annotation Best Practices
-
- ```python
- # Annotate key points
- max_idx = data['value'].idxmax()
- max_val = data['value'].max()
- ax.annotate(f'Peak: {max_val:.2f}',
- xy=(max_idx, max_val),
- xytext=(10, 20),
- textcoords='offset points',
- arrowprops=dict(arrowstyle='->', color='red'),
- fontsize=10,
- fontweight='bold')
- ```
-
- ## Styling for Awesome Charts
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set professional style
- sns.set_style("whitegrid")
- sns.set_context("notebook", font_scale=1.2)
-
- # Custom color palette
- custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
- sns.set_palette(custom_colors)
-
- # Figure with optimal dimensions
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- # ... your plotting code ...
-
- # Tight layout for clean appearance
- plt.tight_layout()
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ## Tips for Trending Charts
-
- 1. **Start with the story**: What trend are you trying to show?
- 2. **Choose the right timeframe**: Match granularity to the pattern
- 3. **Smooth noise**: Use moving averages for volatile data
- 4. **Show context**: Include historical baselines or benchmarks
- 5. **Highlight insights**: Use annotations to draw attention
- 6. **Test readability**: Ensure labels and legends are clear
- 7. **Optimize colors**: Use colorblind-friendly palettes
- 8. **Export high quality**: Always use DPI 300+ for presentations
-
- ## Common Trend Patterns to Visualize
-
- - **Seasonal patterns**: Monthly or quarterly cycles
- - **Long-term growth**: Exponential or linear trends
- - **Volatility changes**: Periods of stability vs. fluctuation
- - **Correlations**: How multiple trends relate
- - **Anomalies**: Outliers or unusual events
- - **Forecasts**: Projected future trends with uncertainty
-
- Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-repo-chronicle.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ # Trends Visualization Guide
+
+ You are an expert at creating compelling trend visualizations that reveal insights from data over time.
+
+ ## Trending Chart Best Practices
+
+ When generating trending charts, focus on:
+
+ ### 1. **Time Series Excellence**
+ - Use line charts for continuous trends over time
+ - Add trend lines or moving averages to highlight patterns
+ - Include clear date/time labels on the x-axis
+ - Show confidence intervals or error bands when relevant
+
+ ### 2. **Comparative Trends**
+ - Use multi-line charts to compare multiple trends
+ - Apply distinct colors for each series with a clear legend
+ - Consider using area charts for stacked trends
+ - Highlight key inflection points or anomalies
+
+ ### 3. **Visual Impact**
+ - Use vibrant, contrasting colors to make trends stand out
+ - Add annotations for significant events or milestones
+ - Include grid lines for easier value reading
+ - Use appropriate scale (linear vs. logarithmic)
+
+ ### 4. **Contextual Information**
+ - Show percentage changes or growth rates
+ - Include baseline comparisons (year-over-year, month-over-month)
+ - Add summary statistics (min, max, average, median)
+ - Highlight recent trends vs. historical patterns
+
+ ## Example Trend Chart Types
+
+ ### Temporal Trends
+ ```python
+ # Line chart with multiple trends
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ for column in data.columns:
+ ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
+ ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ### Growth Rates
+ ```python
+ # Bar chart showing period-over-period growth
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
+ ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
+ ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
+ ax.set_ylabel('Growth %', fontsize=12)
+ ```
+
+ ### Moving Averages
+ ```python
+ # Trend with moving average overlay
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
+ ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
+ ax.fill_between(dates, values, moving_avg, alpha=0.2)
+ ```
+
+ ## Data Preparation for Trends
+
+ ### Time-Based Indexing
+ ```python
+ # Convert to datetime and set as index
+ data['date'] = pd.to_datetime(data['date'])
+ data.set_index('date', inplace=True)
+ data = data.sort_index()
+ ```
+
+ ### Resampling and Aggregation
+ ```python
+ # Resample daily data to weekly
+ weekly_data = data.resample('W').mean()
+
+ # Calculate rolling statistics
+ data['rolling_mean'] = data['value'].rolling(window=7).mean()
+ data['rolling_std'] = data['value'].rolling(window=7).std()
+ ```
+
+ ### Growth Calculations
+ ```python
+ # Calculate percentage change
+ data['pct_change'] = data['value'].pct_change() * 100
+
+ # Calculate year-over-year growth
+ data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
+ ```
+
+ ## Color Palettes for Trends
+
+ Use these palettes for impactful trend visualizations:
+
+ - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
+ - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
+ - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
+ - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
+
+ ## Annotation Best Practices
+
+ ```python
+ # Annotate key points
+ max_idx = data['value'].idxmax()
+ max_val = data['value'].max()
+ ax.annotate(f'Peak: {max_val:.2f}',
+ xy=(max_idx, max_val),
+ xytext=(10, 20),
+ textcoords='offset points',
+ arrowprops=dict(arrowstyle='->', color='red'),
+ fontsize=10,
+ fontweight='bold')
+ ```
+
+ ## Styling for Awesome Charts
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set professional style
+ sns.set_style("whitegrid")
+ sns.set_context("notebook", font_scale=1.2)
+
+ # Custom color palette
+ custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
+ sns.set_palette(custom_colors)
+
+ # Figure with optimal dimensions
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ # ... your plotting code ...
+
+ # Tight layout for clean appearance
+ plt.tight_layout()
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ## Tips for Trending Charts
+
+ 1. **Start with the story**: What trend are you trying to show?
+ 2. **Choose the right timeframe**: Match granularity to the pattern
+ 3. **Smooth noise**: Use moving averages for volatile data
+ 4. **Show context**: Include historical baselines or benchmarks
+ 5. **Highlight insights**: Use annotations to draw attention
+ 6. **Test readability**: Ensure labels and legends are clear
+ 7. **Optimize colors**: Use colorblind-friendly palettes
+ 8. **Export high quality**: Always use DPI 300+ for presentations
+
+ ## Common Trend Patterns to Visualize
+
+ - **Seasonal patterns**: Monthly or quarterly cycles
+ - **Long-term growth**: Exponential or linear trends
+ - **Volatility changes**: Periods of stability vs. fluctuation
+ - **Correlations**: How multiple trends relate
+ - **Anomalies**: Outliers or unusual events
+ - **Forecasts**: Projected future trends with uncertainty
+
+ Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-repo-chronicle.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-safe-output-optimizer.lock.yml b/.github/workflows/daily-safe-output-optimizer.lock.yml
index c119a4d678..ba1cb41968 100644
--- a/.github/workflows/daily-safe-output-optimizer.lock.yml
+++ b/.github/workflows/daily-safe-output-optimizer.lock.yml
@@ -548,224 +548,226 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-safe-output-optimizer.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-safe-output-optimizer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-secrets-analysis.lock.yml b/.github/workflows/daily-secrets-analysis.lock.yml
index 3e46cf9292..d67e5dd3b4 100644
--- a/.github/workflows/daily-secrets-analysis.lock.yml
+++ b/.github/workflows/daily-secrets-analysis.lock.yml
@@ -538,135 +538,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-secrets-analysis.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-secrets-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml
index 98db435c31..b433b6c322 100644
--- a/.github/workflows/daily-semgrep-scan.lock.yml
+++ b/.github/workflows/daily-semgrep-scan.lock.yml
@@ -535,67 +535,69 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-semgrep-scan.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-semgrep-scan.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-team-evolution-insights.lock.yml b/.github/workflows/daily-team-evolution-insights.lock.yml
index 122a5b4b69..0bab2ac8d4 100644
--- a/.github/workflows/daily-team-evolution-insights.lock.yml
+++ b/.github/workflows/daily-team-evolution-insights.lock.yml
@@ -486,135 +486,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-team-evolution-insights.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-team-evolution-insights.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml
index 4e4796472e..d6cbe1b7c9 100644
--- a/.github/workflows/daily-team-status.lock.yml
+++ b/.github/workflows/daily-team-status.lock.yml
@@ -510,142 +510,144 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Formatting
-
- Structure your report with an overview followed by detailed content:
-
- 1. **Content Overview**: Start with 1-2 paragraphs that summarize the key findings, highlights, or main points of your report. This should give readers a quick understanding of what the report contains without needing to expand the details.
-
- 2. **Detailed Content**: Place the rest of your report inside HTML `` and `` tags to allow readers to expand and view the full information. **IMPORTANT**: Always wrap the summary text in `` tags to make it bold.
-
- **Example format:**
-
- `````markdown
- Brief overview paragraph 1 introducing the report and its main findings.
-
- Optional overview paragraph 2 with additional context or highlights.
-
-
- Full Report Details
-
- ## Detailed Analysis
-
- Full report content with all sections, tables, and detailed information goes here.
-
- ### Section 1
- [Content]
-
- ### Section 2
- [Content]
-
-
- `````
-
- ## Reporting Workflow Run Information
-
- When analyzing workflow run logs or reporting information from GitHub Actions runs:
-
- ### 1. Workflow Run ID Formatting
-
- **Always render workflow run IDs as clickable URLs** when mentioning them in your report. The workflow run data includes a `url` field that provides the full GitHub Actions run page URL.
-
- **Format:**
-
- `````markdown
- [§12345](https://github.com/owner/repo/actions/runs/12345)
- `````
-
- **Example:**
-
- `````markdown
- Analysis based on [§456789](https://github.com/githubnext/gh-aw/actions/runs/456789)
- `````
-
- ### 2. Document References for Workflow Runs
-
- When your analysis is based on information mined from one or more workflow runs, **include up to 3 workflow run URLs as document references** at the end of your report.
-
- **Format:**
-
- `````markdown
- ---
-
- **References:**
- - [§12345](https://github.com/owner/repo/actions/runs/12345)
- - [§12346](https://github.com/owner/repo/actions/runs/12346)
- - [§12347](https://github.com/owner/repo/actions/runs/12347)
- `````
-
- **Guidelines:**
-
- - Include **maximum 3 references** to keep reports concise
- - Choose the most relevant or representative runs (e.g., failed runs, high-cost runs, or runs with significant findings)
- - Always use the actual URL from the workflow run data (specifically, use the `url` field from `RunData` or the `RunURL` field from `ErrorSummary`)
- - If analyzing more than 3 runs, select the most important ones for references
-
- ## Footer Attribution
-
- **Do NOT add footer lines** like `> AI generated by...` to your comment. The system automatically appends attribution after your content to prevent duplicates.
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-team-status.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Formatting
+
+ Structure your report with an overview followed by detailed content:
+
+ 1. **Content Overview**: Start with 1-2 paragraphs that summarize the key findings, highlights, or main points of your report. This should give readers a quick understanding of what the report contains without needing to expand the details.
+
+ 2. **Detailed Content**: Place the rest of your report inside HTML `` and `` tags to allow readers to expand and view the full information. **IMPORTANT**: Always wrap the summary text in `` tags to make it bold.
+
+ **Example format:**
+
+ `````markdown
+ Brief overview paragraph 1 introducing the report and its main findings.
+
+ Optional overview paragraph 2 with additional context or highlights.
+
+
+ Full Report Details
+
+ ## Detailed Analysis
+
+ Full report content with all sections, tables, and detailed information goes here.
+
+ ### Section 1
+ [Content]
+
+ ### Section 2
+ [Content]
+
+
+ `````
+
+ ## Reporting Workflow Run Information
+
+ When analyzing workflow run logs or reporting information from GitHub Actions runs:
+
+ ### 1. Workflow Run ID Formatting
+
+ **Always render workflow run IDs as clickable URLs** when mentioning them in your report. The workflow run data includes a `url` field that provides the full GitHub Actions run page URL.
+
+ **Format:**
+
+ `````markdown
+ [§12345](https://github.com/owner/repo/actions/runs/12345)
+ `````
+
+ **Example:**
+
+ `````markdown
+ Analysis based on [§456789](https://github.com/githubnext/gh-aw/actions/runs/456789)
+ `````
+
+ ### 2. Document References for Workflow Runs
+
+ When your analysis is based on information mined from one or more workflow runs, **include up to 3 workflow run URLs as document references** at the end of your report.
+
+ **Format:**
+
+ `````markdown
+ ---
+
+ **References:**
+ - [§12345](https://github.com/owner/repo/actions/runs/12345)
+ - [§12346](https://github.com/owner/repo/actions/runs/12346)
+ - [§12347](https://github.com/owner/repo/actions/runs/12347)
+ `````
+
+ **Guidelines:**
+
+ - Include **maximum 3 references** to keep reports concise
+ - Choose the most relevant or representative runs (e.g., failed runs, high-cost runs, or runs with significant findings)
+ - Always use the actual URL from the workflow run data (specifically, use the `url` field from `RunData` or the `RunURL` field from `ErrorSummary`)
+ - If analyzing more than 3 runs, select the most important ones for references
+
+ ## Footer Attribution
+
+ **Do NOT add footer lines** like `> AI generated by...` to your comment. The system automatically appends attribution after your content to prevent duplicates.
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-team-status.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml
index ef644d7653..c57fb40853 100644
--- a/.github/workflows/daily-testify-uber-super-expert.lock.yml
+++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml
@@ -522,162 +522,164 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Tracks processed test files to avoid duplicates
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/testify-expert` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/testify-expert/*.json, memory/testify-expert/*.txt
- - **Max File Size**: 51200 bytes (0.05 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-testify-uber-super-expert.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Tracks processed test files to avoid duplicates
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/testify-expert` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/testify-expert/*.json, memory/testify-expert/*.txt
+ - **Max File Size**: 51200 bytes (0.05 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-testify-uber-super-expert.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml
index 89f7cd561b..101089eb83 100644
--- a/.github/workflows/daily-workflow-updater.lock.yml
+++ b/.github/workflows/daily-workflow-updater.lock.yml
@@ -486,62 +486,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/daily-workflow-updater.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/daily-workflow-updater.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml
index b5c0f6b00a..13fa2ab30d 100644
--- a/.github/workflows/deep-report.lock.yml
+++ b/.github/workflows/deep-report.lock.yml
@@ -667,348 +667,350 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Long-term insights, patterns, and trend data
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/deep-report` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/deep-report/*.md
- - **Max File Size**: 1048576 bytes (1.00 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
-
- ## Weekly Issues Data
-
- Pre-fetched issues data from the last 7 days is available at `/tmp/gh-aw/weekly-issues-data/issues.json`.
-
- This includes issues that were created or updated within the past week, providing a focused dataset for recent activity analysis.
-
- ### Schema
-
- The weekly issues data structure is:
-
- ```json
- [
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Long-term insights, patterns, and trend data
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/deep-report` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/deep-report/*.md
+ - **Max File Size**: 1048576 bytes (1.00 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
{
- "number": "number",
- "title": "string",
- "state": "string (OPEN or CLOSED)",
- "url": "string",
- "body": "string",
- "createdAt": "string (ISO 8601 timestamp)",
- "updatedAt": "string (ISO 8601 timestamp)",
- "closedAt": "string (ISO 8601 timestamp, null if open)",
- "author": {
- "id": "string",
- "login": "string",
- "name": "string"
- },
- "assignees": [
- {
- "id": "string",
- "login": "string",
- "name": "string"
- }
- ],
- "labels": [
- {
- "id": "string",
- "name": "string",
- "color": "string",
- "description": "string"
- }
- ],
- "milestone": {
- "id": "string",
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+
+ ## Weekly Issues Data
+
+ Pre-fetched issues data from the last 7 days is available at `/tmp/gh-aw/weekly-issues-data/issues.json`.
+
+ This includes issues that were created or updated within the past week, providing a focused dataset for recent activity analysis.
+
+ ### Schema
+
+ The weekly issues data structure is:
+
+ ```json
+ [
+ {
"number": "number",
"title": "string",
- "description": "string",
- "dueOn": "string"
- },
- "comments": [
- {
+ "state": "string (OPEN or CLOSED)",
+ "url": "string",
+ "body": "string",
+ "createdAt": "string (ISO 8601 timestamp)",
+ "updatedAt": "string (ISO 8601 timestamp)",
+ "closedAt": "string (ISO 8601 timestamp, null if open)",
+ "author": {
"id": "string",
- "url": "string",
- "body": "string",
- "createdAt": "string",
- "author": {
+ "login": "string",
+ "name": "string"
+ },
+ "assignees": [
+ {
"id": "string",
"login": "string",
"name": "string"
}
- }
- ]
- }
- ]
- ```
-
- ### Usage Examples
-
- ```bash
- # Get total number of issues from the last week
- jq 'length' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get only open issues
- jq '[.[] | select(.state == "OPEN")]' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get only closed issues
- jq '[.[] | select(.state == "CLOSED")]' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get issue numbers
- jq '[.[].number]' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get issues with specific label
- jq '[.[] | select(.labels | any(.name == "bug"))]' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get issues created in the last 3 days
- DATE_3_DAYS_AGO=$(date -d '3 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-3d '+%Y-%m-%dT%H:%M:%SZ')
- jq --arg date "$DATE_3_DAYS_AGO" '[.[] | select(.createdAt >= $date)]' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Count issues by state
- jq 'group_by(.state) | map({state: .[0].state, count: length})' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get unique authors
- jq '[.[].author.login] | unique' /tmp/gh-aw/weekly-issues-data/issues.json
-
- # Get issues sorted by update time (most recent first)
- jq 'sort_by(.updatedAt) | reverse' /tmp/gh-aw/weekly-issues-data/issues.json
- ```
-
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/deep-report.md}}
- PROMPT_EOF
+ ],
+ "labels": [
+ {
+ "id": "string",
+ "name": "string",
+ "color": "string",
+ "description": "string"
+ }
+ ],
+ "milestone": {
+ "id": "string",
+ "number": "number",
+ "title": "string",
+ "description": "string",
+ "dueOn": "string"
+ },
+ "comments": [
+ {
+ "id": "string",
+ "url": "string",
+ "body": "string",
+ "createdAt": "string",
+ "author": {
+ "id": "string",
+ "login": "string",
+ "name": "string"
+ }
+ }
+ ]
+ }
+ ]
+ ```
+
+ ### Usage Examples
+
+ ```bash
+ # Get total number of issues from the last week
+ jq 'length' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get only open issues
+ jq '[.[] | select(.state == "OPEN")]' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get only closed issues
+ jq '[.[] | select(.state == "CLOSED")]' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get issue numbers
+ jq '[.[].number]' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get issues with specific label
+ jq '[.[] | select(.labels | any(.name == "bug"))]' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get issues created in the last 3 days
+ DATE_3_DAYS_AGO=$(date -d '3 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-3d '+%Y-%m-%dT%H:%M:%SZ')
+ jq --arg date "$DATE_3_DAYS_AGO" '[.[] | select(.createdAt >= $date)]' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Count issues by state
+ jq 'group_by(.state) | map({state: .[0].state, count: length})' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get unique authors
+ jq '[.[].author.login] | unique' /tmp/gh-aw/weekly-issues-data/issues.json
+
+ # Get issues sorted by update time (most recent first)
+ jq 'sort_by(.updatedAt) | reverse' /tmp/gh-aw/weekly-issues-data/issues.json
+ ```
+
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/deep-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml
index 43633b4eeb..8563abca2c 100644
--- a/.github/workflows/delight.lock.yml
+++ b/.github/workflows/delight.lock.yml
@@ -567,246 +567,248 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Track delight findings and historical patterns
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/delight` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/delight/*.json, memory/delight/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/delight.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Track delight findings and historical patterns
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/delight` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/delight/*.json, memory/delight/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/delight.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dependabot-bundler.lock.yml b/.github/workflows/dependabot-bundler.lock.yml
index 92c4df632d..272fbe1abd 100644
--- a/.github/workflows/dependabot-bundler.lock.yml
+++ b/.github/workflows/dependabot-bundler.lock.yml
@@ -542,85 +542,87 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Locations Available
-
- You have access to persistent repo memory folders where you can read and write files that are stored in git branches:
-
- - **campaigns**: `/tmp/gh-aw/repo-memory/campaigns/` (branch: `memory/campaigns`)
-
- - **Read/Write Access**: You can freely read from and write to any files in these folders
- - **Git Branch Storage**: Each memory is stored in its own git branch
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/history/` - organized history files
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dependabot-bundler.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Locations Available
+
+ You have access to persistent repo memory folders where you can read and write files that are stored in git branches:
+
+ - **campaigns**: `/tmp/gh-aw/repo-memory/campaigns/` (branch: `memory/campaigns`)
+
+ - **Read/Write Access**: You can freely read from and write to any files in these folders
+ - **Git Branch Storage**: Each memory is stored in its own git branch
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/history/` - organized history files
+
+ Feel free to create, read, update, and organize files in these folders as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dependabot-bundler.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dependabot-burner.lock.yml b/.github/workflows/dependabot-burner.lock.yml
index 26c4cca676..4961f7e4f0 100644
--- a/.github/workflows/dependabot-burner.lock.yml
+++ b/.github/workflows/dependabot-burner.lock.yml
@@ -757,97 +757,99 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # Campaign Orchestrator
-
- You are a campaign orchestrator that coordinates a single campaign by:
-
- 1. Discovering work items
- 2. Making decisions
- 3. Assigning/Dispatching work items
- 4. Generating a report
-
- - Use only allowlisted safe outputs.
- - Do not interleave reads and writes.
-
- ## Memory & Metrics
-
- If the campaign uses repo-memory:
-
- **Cursor file path**: `/tmp/gh-aw/repo-memory/campaigns//cursor.json`
-
- - If it exists: read first and continue from its boundary.
- - If it does not exist: create it by end of run.
- - Always write the updated cursor back to the same path.
-
- **Metrics snapshots path**: `/tmp/gh-aw/repo-memory/campaigns//metrics/*.json`
-
- - Write **one new** append-only JSON snapshot per run (do not rewrite history).
- - Use UTC date in the filename (example: `metrics/.json`).
-
- ## Reporting
-
- Always report:
- - Failures (with reasons)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dependabot-burner.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # Campaign Orchestrator
+
+ You are a campaign orchestrator that coordinates a single campaign by:
+
+ 1. Discovering work items
+ 2. Making decisions
+ 3. Assigning/Dispatching work items
+ 4. Generating a report
+
+ - Use only allowlisted safe outputs.
+ - Do not interleave reads and writes.
+
+ ## Memory & Metrics
+
+ If the campaign uses repo-memory:
+
+ **Cursor file path**: `/tmp/gh-aw/repo-memory/campaigns//cursor.json`
+
+ - If it exists: read first and continue from its boundary.
+ - If it does not exist: create it by end of run.
+ - Always write the updated cursor back to the same path.
+
+ **Metrics snapshots path**: `/tmp/gh-aw/repo-memory/campaigns//metrics/*.json`
+
+ - Write **one new** append-only JSON snapshot per run (do not rewrite history).
+ - Use UTC date in the filename (example: `metrics/.json`).
+
+ ## Reporting
+
+ Always report:
+ - Failures (with reasons)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dependabot-burner.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml
index c25f3de978..d52115e1df 100644
--- a/.github/workflows/dependabot-go-checker.lock.yml
+++ b/.github/workflows/dependabot-go-checker.lock.yml
@@ -536,62 +536,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dependabot-go-checker.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dependabot-go-checker.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml
index c86bcae888..78cd9a37f9 100644
--- a/.github/workflows/dev-hawk.lock.yml
+++ b/.github/workflows/dev-hawk.lock.yml
@@ -507,67 +507,69 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dev-hawk.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dev-hawk.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml
index 62d8e74ae7..12fc5539a7 100644
--- a/.github/workflows/dev.lock.yml
+++ b/.github/workflows/dev.lock.yml
@@ -483,62 +483,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dev.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dev.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml
index c5c0fd5c72..d3cdc16e12 100644
--- a/.github/workflows/developer-docs-consolidator.lock.yml
+++ b/.github/workflows/developer-docs-consolidator.lock.yml
@@ -575,136 +575,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/developer-docs-consolidator.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/developer-docs-consolidator.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml
index d0d2da7b59..9fc90bff0a 100644
--- a/.github/workflows/dictation-prompt.lock.yml
+++ b/.github/workflows/dictation-prompt.lock.yml
@@ -489,135 +489,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/dictation-prompt.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/dictation-prompt.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/discussion-task-miner.lock.yml b/.github/workflows/discussion-task-miner.lock.yml
index d8449137aa..1cdef2f238 100644
--- a/.github/workflows/discussion-task-miner.lock.yml
+++ b/.github/workflows/discussion-task-miner.lock.yml
@@ -550,246 +550,248 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Track processed discussions and extracted tasks
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/discussion-task-miner` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/discussion-task-miner/*.json, memory/discussion-task-miner/*.md
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/discussion-task-miner.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Track processed discussions and extracted tasks
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/discussion-task-miner` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: memory/discussion-task-miner/*.json, memory/discussion-task-miner/*.md
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/discussion-task-miner.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/docs-noob-tester.lock.yml b/.github/workflows/docs-noob-tester.lock.yml
index 1f82844013..4c4e67045d 100644
--- a/.github/workflows/docs-noob-tester.lock.yml
+++ b/.github/workflows/docs-noob-tester.lock.yml
@@ -516,128 +516,130 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/playwright_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Starting the Documentation Preview Server
-
- **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build.
-
- Navigate to the docs directory and start the preview server in the background:
-
- ```bash
- cd docs
- npm run preview > /tmp/preview.log 2>&1 &
- echo $! > /tmp/server.pid
- ```
-
- This will:
- - Start the preview server on port 4321
- - Redirect output to `/tmp/preview.log`
- - Save the process ID to `/tmp/server.pid` for later cleanup
-
- ## Waiting for Server Readiness
-
- Poll the server with curl to ensure it's ready before use:
-
- ```bash
- for i in {1..30}; do
- curl -s http://localhost:4321 > /dev/null && echo "Server ready!" && break
- echo "Waiting for server... ($i/30)" && sleep 2
- done
- ```
-
- This will:
- - Attempt to connect up to 30 times (60 seconds total)
- - Wait 2 seconds between attempts
- - Exit successfully when server responds
-
- ## Verifying Server Accessibility (Optional)
-
- Optionally verify the server is serving content:
-
- ```bash
- curl -s http://localhost:4321/gh-aw/ | head -20
- ```
-
- ## Stopping the Documentation Server
-
- After you're done using the server, clean up the process:
-
- ```bash
- kill $(cat /tmp/server.pid) 2>/dev/null || true
- rm -f /tmp/server.pid /tmp/preview.log
- ```
-
- This will:
- - Kill the server process using the saved PID
- - Remove temporary files
- - Ignore errors if the process already stopped
-
- ## Usage Notes
-
- - The server runs on `http://localhost:4321`
- - Documentation is accessible at `http://localhost:4321/gh-aw/`
- - Always clean up the server when done to avoid orphan processes
- - If the server fails to start, check `/tmp/preview.log` for errors
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/docs-noob-tester.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/playwright_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Starting the Documentation Preview Server
+
+ **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build.
+
+ Navigate to the docs directory and start the preview server in the background:
+
+ ```bash
+ cd docs
+ npm run preview > /tmp/preview.log 2>&1 &
+ echo $! > /tmp/server.pid
+ ```
+
+ This will:
+ - Start the preview server on port 4321
+ - Redirect output to `/tmp/preview.log`
+ - Save the process ID to `/tmp/server.pid` for later cleanup
+
+ ## Waiting for Server Readiness
+
+ Poll the server with curl to ensure it's ready before use:
+
+ ```bash
+ for i in {1..30}; do
+ curl -s http://localhost:4321 > /dev/null && echo "Server ready!" && break
+ echo "Waiting for server... ($i/30)" && sleep 2
+ done
+ ```
+
+ This will:
+ - Attempt to connect up to 30 times (60 seconds total)
+ - Wait 2 seconds between attempts
+ - Exit successfully when server responds
+
+ ## Verifying Server Accessibility (Optional)
+
+ Optionally verify the server is serving content:
+
+ ```bash
+ curl -s http://localhost:4321/gh-aw/ | head -20
+ ```
+
+ ## Stopping the Documentation Server
+
+ After you're done using the server, clean up the process:
+
+ ```bash
+ kill $(cat /tmp/server.pid) 2>/dev/null || true
+ rm -f /tmp/server.pid /tmp/preview.log
+ ```
+
+ This will:
+ - Kill the server process using the saved PID
+ - Remove temporary files
+ - Ignore errors if the process already stopped
+
+ ## Usage Notes
+
+ - The server runs on `http://localhost:4321`
+ - Documentation is accessible at `http://localhost:4321/gh-aw/`
+ - Always clean up the server when done to avoid orphan processes
+ - If the server fails to start, check `/tmp/preview.log` for errors
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/docs-noob-tester.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/draft-pr-cleanup.lock.yml b/.github/workflows/draft-pr-cleanup.lock.yml
index fd3b19e37d..46071f3d9b 100644
--- a/.github/workflows/draft-pr-cleanup.lock.yml
+++ b/.github/workflows/draft-pr-cleanup.lock.yml
@@ -518,62 +518,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/draft-pr-cleanup.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/draft-pr-cleanup.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml
index 84429fb582..218aa4ad1e 100644
--- a/.github/workflows/duplicate-code-detector.lock.yml
+++ b/.github/workflows/duplicate-code-detector.lock.yml
@@ -558,62 +558,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/duplicate-code-detector.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/duplicate-code-detector.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/example-custom-error-patterns.lock.yml b/.github/workflows/example-custom-error-patterns.lock.yml
index b874207b95..bd691af0f4 100644
--- a/.github/workflows/example-custom-error-patterns.lock.yml
+++ b/.github/workflows/example-custom-error-patterns.lock.yml
@@ -245,47 +245,49 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/example-custom-error-patterns.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/example-custom-error-patterns.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml
index a583db9e43..87e7cb202c 100644
--- a/.github/workflows/example-permissions-warning.lock.yml
+++ b/.github/workflows/example-permissions-warning.lock.yml
@@ -243,47 +243,49 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/example-permissions-warning.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/example-permissions-warning.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml
index f79d938c1d..2bd7532775 100644
--- a/.github/workflows/example-workflow-analyzer.lock.yml
+++ b/.github/workflows/example-workflow-analyzer.lock.yml
@@ -519,135 +519,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/example-workflow-analyzer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/example-workflow-analyzer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml
index ba89546540..12ca52919a 100644
--- a/.github/workflows/firewall-escape.lock.yml
+++ b/.github/workflows/firewall-escape.lock.yml
@@ -506,87 +506,89 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Persistent storage for firewall escape attempt history and strategies
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/firewall-escape` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Max File Size**: 524288 bytes (0.50 MB) per file
- - **Max File Count**: 50 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/firewall-escape.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch. Persistent storage for firewall escape attempt history and strategies
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/firewall-escape` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Max File Size**: 524288 bytes (0.50 MB) per file
+ - **Max File Count**: 50 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/firewall-escape.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml
index 9725f8e70c..81ea082f13 100644
--- a/.github/workflows/firewall.lock.yml
+++ b/.github/workflows/firewall.lock.yml
@@ -244,47 +244,49 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/firewall.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/firewall.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/functional-pragmatist.lock.yml b/.github/workflows/functional-pragmatist.lock.yml
index 74019840ce..162db9804e 100644
--- a/.github/workflows/functional-pragmatist.lock.yml
+++ b/.github/workflows/functional-pragmatist.lock.yml
@@ -489,135 +489,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/functional-pragmatist.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/functional-pragmatist.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/github-mcp-structural-analysis.lock.yml b/.github/workflows/github-mcp-structural-analysis.lock.yml
index dd81c1bacb..2e558a3895 100644
--- a/.github/workflows/github-mcp-structural-analysis.lock.yml
+++ b/.github/workflows/github-mcp-structural-analysis.lock.yml
@@ -550,384 +550,386 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/github-mcp-structural-analysis.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/github-mcp-structural-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml
index 56d8c3b318..2d2901d883 100644
--- a/.github/workflows/github-mcp-tools-report.lock.yml
+++ b/.github/workflows/github-mcp-tools-report.lock.yml
@@ -561,136 +561,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/github-mcp-tools-report.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/github-mcp-tools-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml
index 4f764192d4..e56a64845d 100644
--- a/.github/workflows/github-remote-mcp-auth-test.lock.yml
+++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml
@@ -485,62 +485,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/github-remote-mcp-auth-test.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/github-remote-mcp-auth-test.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml
index 99792f1a6e..8063e03fb2 100644
--- a/.github/workflows/glossary-maintainer.lock.yml
+++ b/.github/workflows/glossary-maintainer.lock.yml
@@ -521,342 +521,545 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ### Documentation
-
- The documentation for this project is available in the `docs/` directory. It uses GitHub-flavored markdown with Astro Starlight for rendering and follows the Diátaxis framework for systematic documentation.
-
- ## Diátaxis Framework
-
- Documentation must be organized into four distinct types, each serving a specific purpose:
-
- ### 1. Tutorials (Learning-Oriented)
- **Purpose**: Guide beginners through achieving a specific outcome to build confidence.
-
- - Start with what the user will build or achieve
- - Provide a clear, step-by-step path from start to finish
- - Include concrete examples and working code
- - Assume minimal prior knowledge
- - Focus on the happy path (avoid edge cases and alternatives)
- - End with a working result the user can see and use
- - Use imperative mood: "Create a file", "Run the command"
-
- **Avoid**: Explaining concepts in depth, multiple options, troubleshooting
-
- ### 2. How-to Guides (Goal-Oriented)
- **Purpose**: Show how to solve a specific real-world problem or accomplish a particular task.
-
- - Title format: "How to [accomplish specific goal]"
- - Assume the user knows the basics
- - Focus on practical steps to solve one problem
- - Include necessary context but stay focused
- - Show multiple approaches only when genuinely useful
- - End when the goal is achieved
- - Use imperative mood: "Configure the setting", "Add the following"
-
- **Avoid**: Teaching fundamentals, explaining every detail, being exhaustive
-
- ### 3. Reference (Information-Oriented)
- **Purpose**: Provide accurate, complete technical descriptions of the system.
-
- - Organized by structure (CLI commands, configuration options, API endpoints)
- - Comprehensive and authoritative
- - Consistent format across all entries
- - Technical accuracy is paramount
- - Include all parameters, options, and return values
- - Use descriptive mood: "The command accepts", "Returns a string"
- - Minimal narrative or explanation
-
- **Avoid**: Instructions, tutorials, opinions on usage
-
- ### 4. Explanation (Understanding-Oriented)
- **Purpose**: Clarify and illuminate topics to deepen understanding.
-
- - Discuss why things are the way they are
- - Explain design decisions and tradeoffs
- - Provide context and background
- - Connect concepts to help form mental models
- - Discuss alternatives and their implications
- - Use indicative mood: "This approach provides", "The engine uses"
-
- **Avoid**: Step-by-step instructions, exhaustive reference material
-
- ## General Style Guidelines
-
- - **Tone**: Neutral, technical, not promotional
- - **Voice**: Avoid "we", "our", "us" (use "the tool", "this command")
- - **Headings**: Use markdown heading syntax, not bold text as headings
- - **Lists**: Avoid long bullet point lists; prefer prose with structure
- - **Code samples**: Minimal and focused; exclude optional fields unless relevant
- - **Language tag**: Use `aw` for agentic workflow snippets with YAML frontmatter
-
- **Example workflow code block**:
- ```aw wrap
- on: push
- # Your workflow steps here
- ```
-
- ## GitHub-Flavored Markdown Syntax
-
- Documentation files use GitHub-flavored markdown with Astro Starlight for rendering. Key syntax elements:
-
- ### Frontmatter
- Every documentation page must have frontmatter:
- ```markdown
- title: Page Title
- description: Brief description for SEO and navigation
- ```
-
- ### GitHub Alerts
- Use GitHub's alert syntax for notes, tips, warnings, and cautions:
- ```markdown
- > [!NOTE]
- > Important information the reader should notice.
-
- > [!TIP]
- > Helpful advice for the reader.
-
- > [!WARNING]
- > Warning about potential issues or pitfalls.
-
- > [!CAUTION]
- > Critical warning about dangerous operations.
-
- > [!IMPORTANT]
- > Key information users need to know.
- ```
-
- ### Code Blocks
- - Use syntax highlighting with language tags
- - Add `title` attribute for file names: ` ```yaml title=".github/workflows/example.yml" `
- - Use `aw` language for agentic workflow files with YAML frontmatter
- - Add `wrap` for line wrapping: ` ```aw wrap `
-
- ### Links
- - Internal links: Use relative paths between documentation pages
- - External links: Open in new tab automatically
- - Link text: Use descriptive text, avoid "click here"
-
- ### Tabs
- Use tabs for showing alternatives (e.g., different languages, platforms):
- ```markdown
- import { Tabs, TabItem } from '@astrojs/starlight/components';
-
-
-
- ```bash
- npm install package
- ```
-
-
- ```bash
- yarn add package
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ### Documentation
+
+ The documentation for this project is available in the `docs/` directory. It uses GitHub-flavored markdown with Astro Starlight for rendering and follows the Diátaxis framework for systematic documentation.
+
+ ## Diátaxis Framework
+
+ Documentation must be organized into four distinct types, each serving a specific purpose:
+
+ ### 1. Tutorials (Learning-Oriented)
+ **Purpose**: Guide beginners through achieving a specific outcome to build confidence.
+
+ - Start with what the user will build or achieve
+ - Provide a clear, step-by-step path from start to finish
+ - Include concrete examples and working code
+ - Assume minimal prior knowledge
+ - Focus on the happy path (avoid edge cases and alternatives)
+ - End with a working result the user can see and use
+ - Use imperative mood: "Create a file", "Run the command"
+
+ **Avoid**: Explaining concepts in depth, multiple options, troubleshooting
+
+ ### 2. How-to Guides (Goal-Oriented)
+ **Purpose**: Show how to solve a specific real-world problem or accomplish a particular task.
+
+ - Title format: "How to [accomplish specific goal]"
+ - Assume the user knows the basics
+ - Focus on practical steps to solve one problem
+ - Include necessary context but stay focused
+ - Show multiple approaches only when genuinely useful
+ - End when the goal is achieved
+ - Use imperative mood: "Configure the setting", "Add the following"
+
+ **Avoid**: Teaching fundamentals, explaining every detail, being exhaustive
+
+ ### 3. Reference (Information-Oriented)
+ **Purpose**: Provide accurate, complete technical descriptions of the system.
+
+ - Organized by structure (CLI commands, configuration options, API endpoints)
+ - Comprehensive and authoritative
+ - Consistent format across all entries
+ - Technical accuracy is paramount
+ - Include all parameters, options, and return values
+ - Use descriptive mood: "The command accepts", "Returns a string"
+ - Minimal narrative or explanation
+
+ **Avoid**: Instructions, tutorials, opinions on usage
+
+ ### 4. Explanation (Understanding-Oriented)
+ **Purpose**: Clarify and illuminate topics to deepen understanding.
+
+ - Discuss why things are the way they are
+ - Explain design decisions and tradeoffs
+ - Provide context and background
+ - Connect concepts to help form mental models
+ - Discuss alternatives and their implications
+ - Use indicative mood: "This approach provides", "The engine uses"
+
+ **Avoid**: Step-by-step instructions, exhaustive reference material
+
+ ## General Style Guidelines
+
+ - **Tone**: Neutral, technical, not promotional
+ - **Voice**: Avoid "we", "our", "us" (use "the tool", "this command")
+ - **Headings**: Use markdown heading syntax, not bold text as headings
+ - **Lists**: Avoid long bullet point lists; prefer prose with structure
+ - **Code samples**: Minimal and focused; exclude optional fields unless relevant
+ - **Language tag**: Use `aw` for agentic workflow snippets with YAML frontmatter
+
+ **Example workflow code block**:
+ ```aw wrap
+ on: push
+ # Your workflow steps here
+ ```
+
+ ## GitHub-Flavored Markdown Syntax
+
+ Documentation files use GitHub-flavored markdown with Astro Starlight for rendering. Key syntax elements:
+
+ ### Frontmatter
+ Every documentation page must have frontmatter:
+ ```markdown
+ title: Page Title
+ description: Brief description for SEO and navigation
+ ```
+
+ ### GitHub Alerts
+ Use GitHub's alert syntax for notes, tips, warnings, and cautions:
+ ```markdown
+ > [!NOTE]
+ > Important information the reader should notice.
+
+ > [!TIP]
+ > Helpful advice for the reader.
+
+ > [!WARNING]
+ > Warning about potential issues or pitfalls.
+
+ > [!CAUTION]
+ > Critical warning about dangerous operations.
+
+ > [!IMPORTANT]
+ > Key information users need to know.
+ ```
+
+ ### Code Blocks
+ - Use syntax highlighting with language tags
+ - Add `title` attribute for file names: ` ```yaml title=".github/workflows/example.yml" `
+ - Use `aw` language for agentic workflow files with YAML frontmatter
+ - Add `wrap` for line wrapping: ` ```aw wrap `
+
+ ### Links
+ - Internal links: Use relative paths between documentation pages
+ - External links: Open in new tab automatically
+ - Link text: Use descriptive text, avoid "click here"
+
+ ### Tabs
+ Use tabs for showing alternatives (e.g., different languages, platforms):
+ ```markdown
+ import { Tabs, TabItem } from '@astrojs/starlight/components';
+
+
+
+ ```bash
+ npm install package
+ ```
+
+
+ ```bash
+ yarn add package
+ ```
+
+
+ ```
+
+ ### Cards
+ Use cards for navigation or highlighting multiple options:
+ ```markdown
+ import { Card, CardGrid } from '@astrojs/starlight/components';
+
+
+
+ Quick introduction to the basics.
+
+
+ Deep dive into advanced features.
+
+
+ ```
+
+ **Remember**: Keep components minimal. Prefer standard markdown when possible.
+
+ ## Content to Avoid
+
+ - "Key Features" sections
+ - Marketing language or selling points
+ - Excessive bullet points (prefer structured prose)
+ - Overly verbose examples with all optional parameters
+ - Mixing documentation types (e.g., tutorials that become reference)
+
+ ## Avoiding Documentation Bloat
+
+ Documentation bloat reduces clarity and makes content harder to navigate. Common types of bloat include:
+
+ ### Types of Documentation Bloat
+
+ 1. **Duplicate content**: Same information repeated in different sections
+ 2. **Excessive bullet points**: Long lists that could be condensed into prose or tables
+ 3. **Redundant examples**: Multiple examples showing the same concept
+ 4. **Verbose descriptions**: Overly wordy explanations that could be more concise
+ 5. **Repetitive structure**: The same "What it does" / "Why it's valuable" pattern overused
+
+ ### Writing Concise Documentation
+
+ When editing documentation, focus on:
+
+ **Consolidate bullet points**:
+ - Convert long bullet lists into concise prose or tables
+ - Remove redundant points that say the same thing differently
+
+ **Eliminate duplicates**:
+ - Remove repeated information
+ - Consolidate similar sections
+
+ **Condense verbose text**:
+ - Make descriptions more direct and concise
+ - Remove filler words and phrases
+ - Keep technical accuracy while reducing word count
+
+ **Standardize structure**:
+ - Reduce repetitive "What it does" / "Why it's valuable" patterns
+ - Use varied, natural language
+
+ **Simplify code samples**:
+ - Remove unnecessary complexity from code examples
+ - Focus on demonstrating the core concept clearly
+ - Eliminate boilerplate or setup code unless essential for understanding
+ - Keep examples minimal yet complete
+ - Use realistic but simple scenarios
+
+ ### Example: Before and After
+
+ **Before (Bloated)**:
+ ```markdown
+ ### Tool Name
+ Description of the tool.
+
+ - **What it does**: This tool does X, Y, and Z
+ - **Why it's valuable**: It's valuable because A, B, and C
+ - **How to use**: You use it by doing steps 1, 2, 3, 4, 5
+ - **When to use**: Use it when you need X
+ - **Benefits**: Gets you benefit A, benefit B, benefit C
+ - **Learn more**: [Link](url)
+ ```
+
+ **After (Concise)**:
+ ```markdown
+ ### Tool Name
+ Description of the tool that does X, Y, and Z to achieve A, B, and C.
+
+ Use it when you need X by following steps 1-5. [Learn more](url)
+ ```
+
+ ### Documentation Quality Guidelines
+
+ 1. **Preserve meaning**: Never lose important information
+ 2. **Be surgical**: Make precise edits, don't rewrite everything
+ 3. **Maintain tone**: Keep the neutral, technical tone
+ 4. **Test locally**: Verify links and formatting are still correct
+
+ ## Structure by File Type
+
+ - **Getting Started**: Tutorial format
+ - **How-to Guides**: Goal-oriented, one task per guide
+ - **CLI Reference**: Reference format, complete command documentation
+ - **Concepts**: Explanation format, building understanding
+ - **API Reference**: Reference format, complete API documentation
+
+ # Technical Documentation Writer for GitHub Actions
+
+ You are an AI technical documentation writer that produces developer-focused documentation for a **GitHub Actions library**.
+ Your docs follow the **GitHub Docs voice** and use standard markdown with GitHub-flavored enhancements.
+ You apply user-research–backed best practices to ensure clarity, discoverability, and developer experience (DX).
+
+ ## Core Principles
+
+ ### Framework
+ - Output uses **GitHub-flavored markdown** features:
+ - Markdown with headings, sidebars, and TOC.
+ - Autogenerated navigation by directory (`getting-started/`, `guides/`, `reference/`).
+ - GitHub alerts (`> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!CAUTION]`) for key callouts.
+ - Frontmatter metadata (`title`, `description`) for each page.
+
+ ### Style & Tone (GitHub Docs)
+ - Clear, concise, approachable English.
+ - Active voice; address reader as "you".
+ - Friendly, empathetic, trustworthy tone.
+ - Prioritize clarity over rigid grammar rules.
+ - Consistent terminology across all docs.
+ - Inclusive, globally understandable (avoid slang/idioms).
+
+ ### Structure (Diátaxis-inspired)
+ - **Getting Started** → prerequisites, install, first example.
+ - **How-to Guides** → task-based, step-by-step workflows.
+ - **Reference** → full breakdown of inputs, outputs, options.
+ - **Concepts/FAQs** → background explanations.
+
+ ### Developer Experience (DX)
+ - Runnable, copy-paste–ready code blocks.
+ - Prerequisites clearly listed.
+ - Minimal setup friction.
+ - Early "Hello World" example.
+ - Optimized headings for search.
+
+ ## Navigation & Linking
+ - Sidebar auto-generated by folder structure.
+ - Per-page TOC built from headings.
+ - Descriptive internal links (`See [Getting Started](/docs/getting-started)`).
+ - Relative links within docs; clear labels for external references.
+
+ ## Code Guidelines
+ - Use fenced code blocks with language tags:
+ ```yaml
+ name: CI
+ on: [push]
+ jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - uses: my-org/my-action@v1
```
-
-
- ```
-
- ### Cards
- Use cards for navigation or highlighting multiple options:
- ```markdown
- import { Card, CardGrid } from '@astrojs/starlight/components';
-
-
-
- Quick introduction to the basics.
-
-
- Deep dive into advanced features.
-
-
- ```
-
- **Remember**: Keep components minimal. Prefer standard markdown when possible.
-
- ## Content to Avoid
-
- - "Key Features" sections
- - Marketing language or selling points
- - Excessive bullet points (prefer structured prose)
- - Overly verbose examples with all optional parameters
- - Mixing documentation types (e.g., tutorials that become reference)
-
- ## Avoiding Documentation Bloat
-
- Documentation bloat reduces clarity and makes content harder to navigate. Common types of bloat include:
-
- ### Types of Documentation Bloat
-
- 1. **Duplicate content**: Same information repeated in different sections
- 2. **Excessive bullet points**: Long lists that could be condensed into prose or tables
- 3. **Redundant examples**: Multiple examples showing the same concept
- 4. **Verbose descriptions**: Overly wordy explanations that could be more concise
- 5. **Repetitive structure**: The same "What it does" / "Why it's valuable" pattern overused
-
- ### Writing Concise Documentation
-
- When editing documentation, focus on:
-
- **Consolidate bullet points**:
- - Convert long bullet lists into concise prose or tables
- - Remove redundant points that say the same thing differently
-
- **Eliminate duplicates**:
- - Remove repeated information
- - Consolidate similar sections
-
- **Condense verbose text**:
- - Make descriptions more direct and concise
- - Remove filler words and phrases
- - Keep technical accuracy while reducing word count
-
- **Standardize structure**:
- - Reduce repetitive "What it does" / "Why it's valuable" patterns
- - Use varied, natural language
-
- **Simplify code samples**:
- - Remove unnecessary complexity from code examples
- - Focus on demonstrating the core concept clearly
- - Eliminate boilerplate or setup code unless essential for understanding
- - Keep examples minimal yet complete
- - Use realistic but simple scenarios
-
- ### Example: Before and After
-
- **Before (Bloated)**:
- ```markdown
- ### Tool Name
- Description of the tool.
-
- - **What it does**: This tool does X, Y, and Z
- - **Why it's valuable**: It's valuable because A, B, and C
- - **How to use**: You use it by doing steps 1, 2, 3, 4, 5
- - **When to use**: Use it when you need X
- - **Benefits**: Gets you benefit A, benefit B, benefit C
- - **Learn more**: [Link](url)
- ```
-
- **After (Concise)**:
- ```markdown
- ### Tool Name
- Description of the tool that does X, Y, and Z to achieve A, B, and C.
-
- Use it when you need X by following steps 1-5. [Learn more](url)
- ```
-
- ### Documentation Quality Guidelines
-
- 1. **Preserve meaning**: Never lose important information
- 2. **Be surgical**: Make precise edits, don't rewrite everything
- 3. **Maintain tone**: Keep the neutral, technical tone
- 4. **Test locally**: Verify links and formatting are still correct
-
- ## Structure by File Type
-
- - **Getting Started**: Tutorial format
- - **How-to Guides**: Goal-oriented, one task per guide
- - **CLI Reference**: Reference format, complete command documentation
- - **Concepts**: Explanation format, building understanding
- - **API Reference**: Reference format, complete API documentation
-
- # Technical Documentation Writer for GitHub Actions
-
- You are an AI technical documentation writer that produces developer-focused documentation for a **GitHub Actions library**.
- Your docs follow the **GitHub Docs voice** and use standard markdown with GitHub-flavored enhancements.
- You apply user-research–backed best practices to ensure clarity, discoverability, and developer experience (DX).
-
- ## Core Principles
-
- ### Framework
- - Output uses **GitHub-flavored markdown** features:
- - Markdown with headings, sidebars, and TOC.
- - Autogenerated navigation by directory (`getting-started/`, `guides/`, `reference/`).
- - GitHub alerts (`> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!CAUTION]`) for key callouts.
- - Frontmatter metadata (`title`, `description`) for each page.
-
- ### Style & Tone (GitHub Docs)
- - Clear, concise, approachable English.
- - Active voice; address reader as "you".
- - Friendly, empathetic, trustworthy tone.
- - Prioritize clarity over rigid grammar rules.
- - Consistent terminology across all docs.
- - Inclusive, globally understandable (avoid slang/idioms).
-
- ### Structure (Diátaxis-inspired)
- - **Getting Started** → prerequisites, install, first example.
- - **How-to Guides** → task-based, step-by-step workflows.
- - **Reference** → full breakdown of inputs, outputs, options.
- - **Concepts/FAQs** → background explanations.
-
- ### Developer Experience (DX)
- - Runnable, copy-paste–ready code blocks.
- - Prerequisites clearly listed.
- - Minimal setup friction.
- - Early "Hello World" example.
- - Optimized headings for search.
-
- ## Navigation & Linking
- - Sidebar auto-generated by folder structure.
- - Per-page TOC built from headings.
- - Descriptive internal links (`See [Getting Started](/docs/getting-started)`).
- - Relative links within docs; clear labels for external references.
-
- ## Code Guidelines
- - Use fenced code blocks with language tags:
+ - Do **not** include `$` prompts.
+ - Use ALL_CAPS placeholders (e.g. `USERNAME`).
+ - Keep lines ~60 chars wide.
+ - Comment out command outputs.
+
+ ## Alerts & Callouts
+ Use GitHub alert syntax sparingly:
+
+ > [!NOTE]
+ > This is optional context.
+
+ > [!TIP]
+ > This is a recommended best practice.
+
+ > [!WARNING]
+ > This step may cause irreversible changes.
+
+ > [!CAUTION]
+ > This action could result in data loss.
+
+ ## Behavior Rules
+ - Optimize for clarity and user goals.
+ - Check factual accuracy (syntax, versions).
+ - Maintain voice and consistency.
+ - Anticipate pitfalls and explain fixes empathetically.
+ - Use alerts only when necessary.
+
+ ## Build and Validation Workflow
+
+ **ALWAYS** follow this workflow before completing your work or returning to the user:
+
+ ### 1. Build the Documentation
+
+ Run the build command from the repository root:
+ ```bash
+ make build-docs
+ ```
+
+ This command will:
+ - Install dependencies if needed (via `deps-docs`)
+ - Run prebuild scripts (generate agent factory, build slides)
+ - Build the Astro documentation
+ - Validate internal links
+ - Generate search indexes
+
+ ### 2. Review Build Output
+
+ Check the build output for:
+ - **Errors**: Build failures, compilation errors
+ - **Warnings**: Link validation issues, deprecated features
+ - **Success messages**: Verify pages are built correctly
+
+ ### 3. Fix Build Issues
+
+ If the build fails or has warnings, fix these common issues:
+
+ **Link validation errors:**
+ - Fix broken internal links (use `/gh-aw/path/to/page/` format for Astro)
+ - Update relative links to use correct paths
+ - Ensure linked pages exist
+
+ **Frontmatter issues:**
+ - Ensure all `.md` files have required `title` and `description`
+ - Fix YAML syntax errors in frontmatter
+ - Verify frontmatter fields are valid
+
+ **Markdown syntax errors:**
+ - Fix malformed code blocks (ensure proper language tags)
+ - Check for unclosed tags or brackets
+ - Verify proper heading hierarchy
+
+ **Missing assets:**
+ - Check that referenced images exist in `docs/src/assets/` or `docs/public/`
+ - Fix broken image paths
+ - Verify asset file names match references
+
+ **Astro/Starlight configuration:**
+ - Verify sidebar configuration in `astro.config.mjs`
+ - Check component imports and paths
+ - Ensure content collections are properly defined
+
+ ### 4. Rebuild and Verify
+
+ After fixing issues, rebuild to verify:
+ ```bash
+ make build-docs
+ ```
+
+ Check that:
+ - Build completes successfully without errors
+ - `docs/dist` directory is created and populated
+ - All pages are generated correctly
+ - Link validation passes
+
+ ### 5. Only Return When Build Succeeds
+
+ **Do not return to the user until:**
+ - ✅ `make build-docs` completes successfully without errors
+ - ✅ All warnings are addressed or documented
+ - ✅ Built documentation in `docs/dist` is verified
+ - ✅ Links and navigation validate correctly
+
+ ## Available Build Commands
+
+ Use these commands from the repository root:
+
+ ```bash
+ # Install documentation dependencies (Node.js 20+ required)
+ make deps-docs
+
+ # Build the documentation (recommended before completing work)
+ make build-docs
+
+ # Start development server for live preview at http://localhost:4321
+ make dev-docs
+
+ # Preview built documentation with production server
+ make preview-docs
+
+ # Clean documentation artifacts (dist, node_modules, .astro)
+ make clean-docs
+ ```
+
+ ## Build Troubleshooting Guide
+
+ ### Common Build Errors and Solutions
+
+ **Error: "Link validation failed"**
+ ```
+ Solution: Check for broken internal links and fix paths
+ ```
+
+ **Error: "Missing frontmatter field"**
+ ```
+ Solution: Add required title and description to .md files
+ ```
+
+ **Error: "Invalid markdown syntax"**
+ ```
+ Solution: Check code blocks, headings, and frontmatter YAML
+ ```
+
+ **Error: "Module not found" or "Cannot find file"**
+ ```
+ Solution: Verify file paths and imports are correct
+ ```
+
+ **Error: "Starlight plugin error"**
+ ```
+ Solution: Check astro.config.mjs for configuration issues
+ ```
+
+ ### Debugging Process
+
+ 1. **Read error messages carefully** - they usually indicate the exact issue
+ 2. **Check the failing file** - look at the file mentioned in the error
+ 3. **Fix the issue** - apply the appropriate solution
+ 4. **Rebuild** - run `make build-docs` again to verify
+ 5. **Repeat if needed** - continue until build succeeds
+
+ ### Development Server for Testing
+
+ Use the development server to preview changes in real-time:
+ ```bash
+ make dev-docs
+ ```
+
+ This starts Astro dev server at http://localhost:4321 with:
+ - Hot module reloading
+ - Fast refresh for instant updates
+ - Live error reporting
+ - Interactive debugging
+
+ ## Example Document Skeleton
+ ```md
+ ---
+ title: Getting Started
+ description: Quickstart for using the GitHub Actions library
+ ---
+
+ # Getting Started
+
+ ## Prerequisites
+ - Node.js ≥ 20
+ - GitHub account
+
+ ## Installation
+ ```bash
+ pnpm add @my-org/github-action
+ ```
+
+ ## Quick Example
```yaml
name: CI
on: [push]
@@ -867,217 +1070,16 @@ jobs:
- uses: actions/checkout@v5
- uses: my-org/my-action@v1
```
- - Do **not** include `$` prompts.
- - Use ALL_CAPS placeholders (e.g. `USERNAME`).
- - Keep lines ~60 chars wide.
- - Comment out command outputs.
-
- ## Alerts & Callouts
- Use GitHub alert syntax sparingly:
-
- > [!NOTE]
- > This is optional context.
-
- > [!TIP]
- > This is a recommended best practice.
-
- > [!WARNING]
- > This step may cause irreversible changes.
-
- > [!CAUTION]
- > This action could result in data loss.
-
- ## Behavior Rules
- - Optimize for clarity and user goals.
- - Check factual accuracy (syntax, versions).
- - Maintain voice and consistency.
- - Anticipate pitfalls and explain fixes empathetically.
- - Use alerts only when necessary.
-
- ## Build and Validation Workflow
-
- **ALWAYS** follow this workflow before completing your work or returning to the user:
-
- ### 1. Build the Documentation
-
- Run the build command from the repository root:
- ```bash
- make build-docs
- ```
-
- This command will:
- - Install dependencies if needed (via `deps-docs`)
- - Run prebuild scripts (generate agent factory, build slides)
- - Build the Astro documentation
- - Validate internal links
- - Generate search indexes
-
- ### 2. Review Build Output
-
- Check the build output for:
- - **Errors**: Build failures, compilation errors
- - **Warnings**: Link validation issues, deprecated features
- - **Success messages**: Verify pages are built correctly
-
- ### 3. Fix Build Issues
-
- If the build fails or has warnings, fix these common issues:
-
- **Link validation errors:**
- - Fix broken internal links (use `/gh-aw/path/to/page/` format for Astro)
- - Update relative links to use correct paths
- - Ensure linked pages exist
-
- **Frontmatter issues:**
- - Ensure all `.md` files have required `title` and `description`
- - Fix YAML syntax errors in frontmatter
- - Verify frontmatter fields are valid
-
- **Markdown syntax errors:**
- - Fix malformed code blocks (ensure proper language tags)
- - Check for unclosed tags or brackets
- - Verify proper heading hierarchy
-
- **Missing assets:**
- - Check that referenced images exist in `docs/src/assets/` or `docs/public/`
- - Fix broken image paths
- - Verify asset file names match references
-
- **Astro/Starlight configuration:**
- - Verify sidebar configuration in `astro.config.mjs`
- - Check component imports and paths
- - Ensure content collections are properly defined
-
- ### 4. Rebuild and Verify
-
- After fixing issues, rebuild to verify:
- ```bash
- make build-docs
- ```
-
- Check that:
- - Build completes successfully without errors
- - `docs/dist` directory is created and populated
- - All pages are generated correctly
- - Link validation passes
-
- ### 5. Only Return When Build Succeeds
-
- **Do not return to the user until:**
- - ✅ `make build-docs` completes successfully without errors
- - ✅ All warnings are addressed or documented
- - ✅ Built documentation in `docs/dist` is verified
- - ✅ Links and navigation validate correctly
-
- ## Available Build Commands
-
- Use these commands from the repository root:
-
- ```bash
- # Install documentation dependencies (Node.js 20+ required)
- make deps-docs
-
- # Build the documentation (recommended before completing work)
- make build-docs
-
- # Start development server for live preview at http://localhost:4321
- make dev-docs
-
- # Preview built documentation with production server
- make preview-docs
-
- # Clean documentation artifacts (dist, node_modules, .astro)
- make clean-docs
- ```
-
- ## Build Troubleshooting Guide
-
- ### Common Build Errors and Solutions
-
- **Error: "Link validation failed"**
- ```
- Solution: Check for broken internal links and fix paths
- ```
-
- **Error: "Missing frontmatter field"**
- ```
- Solution: Add required title and description to .md files
- ```
-
- **Error: "Invalid markdown syntax"**
- ```
- Solution: Check code blocks, headings, and frontmatter YAML
- ```
-
- **Error: "Module not found" or "Cannot find file"**
- ```
- Solution: Verify file paths and imports are correct
- ```
-
- **Error: "Starlight plugin error"**
- ```
- Solution: Check astro.config.mjs for configuration issues
- ```
-
- ### Debugging Process
-
- 1. **Read error messages carefully** - they usually indicate the exact issue
- 2. **Check the failing file** - look at the file mentioned in the error
- 3. **Fix the issue** - apply the appropriate solution
- 4. **Rebuild** - run `make build-docs` again to verify
- 5. **Repeat if needed** - continue until build succeeds
-
- ### Development Server for Testing
-
- Use the development server to preview changes in real-time:
- ```bash
- make dev-docs
- ```
-
- This starts Astro dev server at http://localhost:4321 with:
- - Hot module reloading
- - Fast refresh for instant updates
- - Live error reporting
- - Interactive debugging
-
- ## Example Document Skeleton
- ```md
- ---
- title: Getting Started
- description: Quickstart for using the GitHub Actions library
- ---
-
- # Getting Started
-
- ## Prerequisites
- - Node.js ≥ 20
- - GitHub account
-
- ## Installation
- ```bash
- pnpm add @my-org/github-action
- ```
-
- ## Quick Example
- ```yaml
- name: CI
- on: [push]
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v5
- - uses: my-org/my-action@v1
- ```
-
- ---
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/glossary-maintainer.md}}
- PROMPT_EOF
+
+ ---
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/glossary-maintainer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/go-fan.lock.yml b/.github/workflows/go-fan.lock.yml
index 142a0e4454..767c039c89 100644
--- a/.github/workflows/go-fan.lock.yml
+++ b/.github/workflows/go-fan.lock.yml
@@ -511,136 +511,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/go-fan.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/go-fan.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/go-logger.lock.yml b/.github/workflows/go-logger.lock.yml
index 6a0540f117..f65cdcf433 100644
--- a/.github/workflows/go-logger.lock.yml
+++ b/.github/workflows/go-logger.lock.yml
@@ -654,85 +654,87 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- **IMPORTANT**: Always use the `safeinputs-go` and `safeinputs-make` tools for Go and Make commands instead of running them directly via bash. These safe-input tools provide consistent execution and proper logging.
-
- **Correct**:
- ```
- Use the safeinputs-go tool with args: "test ./..."
- Use the safeinputs-make tool with args: "build"
- Use the safeinputs-make tool with args: "lint"
- Use the safeinputs-make tool with args: "test-unit"
- ```
-
- **Incorrect**:
- ```
- Use the go safe-input tool with args: "test ./..." ❌ (Wrong tool name - use safeinputs-go)
- Run: go test ./... ❌ (Use safeinputs-go instead)
- Execute bash: make build ❌ (Use safeinputs-make instead)
- ```
-
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/go-logger.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ **IMPORTANT**: Always use the `safeinputs-go` and `safeinputs-make` tools for Go and Make commands instead of running them directly via bash. These safe-input tools provide consistent execution and proper logging.
+
+ **Correct**:
+ ```
+ Use the safeinputs-go tool with args: "test ./..."
+ Use the safeinputs-make tool with args: "build"
+ Use the safeinputs-make tool with args: "lint"
+ Use the safeinputs-make tool with args: "test-unit"
+ ```
+
+ **Incorrect**:
+ ```
+ Use the go safe-input tool with args: "test ./..." ❌ (Wrong tool name - use safeinputs-go)
+ Run: go test ./... ❌ (Use safeinputs-go instead)
+ Execute bash: make build ❌ (Use safeinputs-make instead)
+ ```
+
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/go-logger.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/go-pattern-detector.lock.yml b/.github/workflows/go-pattern-detector.lock.yml
index afdc464a0c..6aac5f08e9 100644
--- a/.github/workflows/go-pattern-detector.lock.yml
+++ b/.github/workflows/go-pattern-detector.lock.yml
@@ -511,99 +511,101 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## ast-grep MCP Server
-
- ast-grep is a powerful structural search and replace tool for code. It uses tree-sitter grammars to parse and search code based on its structure rather than just text patterns.
-
- ### Available Tools
-
- The ast-grep MCP server provides MCP tools for structural code analysis. The specific tools exposed by the server can be discovered using the MCP protocol. This server enables:
- - Searching code patterns using tree-sitter grammars
- - Structural code analysis
- - Pattern-based code transformations
-
- ### Basic Usage
-
- The MCP server exposes ast-grep functionality through its MCP tools interface. When using ast-grep in your workflow, you can perform structural searches across multiple programming languages (Go, JavaScript, TypeScript, Python, etc.) with pattern matching based on code structure rather than text.
-
- **Example patterns that can be searched:**
-
- 1. **Unmarshal with dash tag** (problematic Go pattern):
- - Pattern: `json:"-"`
- - Reference: https://ast-grep.github.io/catalog/go/unmarshal-tag-is-dash.html
-
- 2. **Error handling patterns:**
- - Pattern: `if err != nil { $$$A }`
-
- 3. **Function call patterns:**
- - Pattern: `functionName($$$ARGS)`
-
- ### More Information
-
- - Documentation: https://ast-grep.github.io/
- - Go patterns catalog: https://ast-grep.github.io/catalog/go/
- - Pattern syntax guide: https://ast-grep.github.io/guide/pattern-syntax.html
- - Docker image: https://hub.docker.com/r/mcp/ast-grep
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/go-pattern-detector.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## ast-grep MCP Server
+
+ ast-grep is a powerful structural search and replace tool for code. It uses tree-sitter grammars to parse and search code based on its structure rather than just text patterns.
+
+ ### Available Tools
+
+ The ast-grep MCP server provides MCP tools for structural code analysis. The specific tools exposed by the server can be discovered using the MCP protocol. This server enables:
+ - Searching code patterns using tree-sitter grammars
+ - Structural code analysis
+ - Pattern-based code transformations
+
+ ### Basic Usage
+
+ The MCP server exposes ast-grep functionality through its MCP tools interface. When using ast-grep in your workflow, you can perform structural searches across multiple programming languages (Go, JavaScript, TypeScript, Python, etc.) with pattern matching based on code structure rather than text.
+
+ **Example patterns that can be searched:**
+
+ 1. **Unmarshal with dash tag** (problematic Go pattern):
+ - Pattern: `json:"-"`
+ - Reference: https://ast-grep.github.io/catalog/go/unmarshal-tag-is-dash.html
+
+ 2. **Error handling patterns:**
+ - Pattern: `if err != nil { $$$A }`
+
+ 3. **Function call patterns:**
+ - Pattern: `functionName($$$ARGS)`
+
+ ### More Information
+
+ - Documentation: https://ast-grep.github.io/
+ - Go patterns catalog: https://ast-grep.github.io/catalog/go/
+ - Pattern syntax guide: https://ast-grep.github.io/guide/pattern-syntax.html
+ - Docker image: https://hub.docker.com/r/mcp/ast-grep
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/go-pattern-detector.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/grumpy-reviewer.lock.yml b/.github/workflows/grumpy-reviewer.lock.yml
index 2b7c1a30ac..5a27a73342 100644
--- a/.github/workflows/grumpy-reviewer.lock.yml
+++ b/.github/workflows/grumpy-reviewer.lock.yml
@@ -580,66 +580,68 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/grumpy-reviewer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/grumpy-reviewer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/hourly-ci-cleaner.lock.yml b/.github/workflows/hourly-ci-cleaner.lock.yml
index 3d47b9d994..d9ec09011f 100644
--- a/.github/workflows/hourly-ci-cleaner.lock.yml
+++ b/.github/workflows/hourly-ci-cleaner.lock.yml
@@ -526,354 +526,356 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # CI Cleaner Agent
-
- You are a specialized AI agent that **tidies up the repository CI state** in the `githubnext/gh-aw` repository. Your job is to ensure the codebase is clean, well-formatted, passes all linters and tests, and has all workflows properly compiled.
-
- Read the ENTIRE content of this file carefully before proceeding. Follow the instructions precisely.
-
- ## First Step: Check CI Status
-
- **IMPORTANT**: Before doing any work, check if the CI is currently failing or passing by examining the workflow context provided to you.
-
- If the workflow context indicates that **CI is passing** (e.g., `ci_status: success`):
- 1. **STOP immediately** - Do not run any commands
- 2. **Call the `noop` tool** (from the safe-outputs MCP server) with a message like:
- ```
- CI is passing on main branch - no cleanup needed
- ```
- 3. **Exit** - Your work is done
-
- If the workflow context indicates that **CI is failing** (e.g., `ci_status: failure`), proceed with the cleanup tasks below.
-
- ## Your Responsibilities
-
- When CI is failing, you perform the following tasks in sequence to clean up the CI state:
-
- 1. **Format sources** (Go, JavaScript, JSON)
- 2. **Run linters** and fix any linting issues
- 3. **Run tests** (Go unit, Go integration, JavaScript)
- 4. **Fix test failures**
- 5. **Recompile all workflows**
-
- ## Detailed Task Steps
-
- ### 1. Format Sources
-
- Format all source code files to ensure consistent code style:
-
- ```bash
- make fmt
- ```
-
- This command runs:
- - `make fmt-go` - Format Go code with `go fmt`
- - `make fmt-cjs` - Format JavaScript (.cjs and .js) files in pkg/workflow/js
- - `make fmt-json` - Format JSON files in pkg directory
-
- **Success criteria**: The command completes without errors and reports "✓ Code formatted successfully"
-
- ### 2. Run Linters and Fix Issues
-
- Run all linters to check code quality:
-
- ```bash
- make lint
- ```
-
- This command runs:
- - `make fmt-check` - Check Go code formatting
- - `make fmt-check-json` - Check JSON file formatting
- - `make lint-cjs` - Check JavaScript file formatting and style
- - `make golint` - Run golangci-lint on Go code
-
- **If linting fails**:
- 1. Review the error messages carefully
- 2. Fix issues one by one based on linter feedback
- 3. For Go linting errors from `golangci-lint`:
- - Read the error message and file location
- - Fix the specific issue (unused variables, ineffective assignments, etc.)
- - Re-run `make lint` to verify the fix
- 4. For JavaScript linting errors:
- - Check the formatting with `cd pkg/workflow/js && npm run lint:cjs`
- - Fix any issues reported
- - Re-run `make fmt-cjs` if needed
- 5. For formatting issues:
- - Run `make fmt` to auto-fix formatting
- - Re-run `make lint` to verify
-
- **Success criteria**: All linters pass and report "✓ All validations passed"
-
- ### 3. Run Go Tests
-
- Run Go unit tests (faster, recommended for iterative development):
-
- ```bash
- make test-unit
- ```
-
- Run all Go tests including integration tests:
-
- ```bash
- make test
- ```
-
- **If tests fail**:
- 1. Review the test failure output carefully
- 2. Identify which test(s) failed and why
- 3. Fix the underlying issue:
- - For logic errors: Fix the implementation
- - For test errors: Update the test if expectations changed
- - For compilation errors: Fix syntax/type issues
- 4. Re-run the specific test or test package to verify:
- ```bash
- go test -v ./pkg/path/to/package/...
- ```
- 5. Once fixed, run `make test-unit` or `make test` again
-
- **Success criteria**: All tests pass with no failures
-
- ### 4. Run JavaScript Tests
-
- Run JavaScript tests for workflow files:
-
- ```bash
- make test-js
- ```
-
- **If tests fail**:
- 1. Review the test failure output
- 2. Check if the issue is in:
- - JavaScript source files in `pkg/workflow/js/`
- - Test files
- - Type definitions
- 3. Fix the issue and re-run `make test-js`
-
- **Success criteria**: All JavaScript tests pass
-
- ### 5. Recompile All Workflows
-
- Recompile all workflow markdown files to YAML lock files:
-
- ```bash
- make recompile
- ```
-
- This command:
- 1. Syncs templates from `.github` to `pkg/cli/templates`
- 2. Rebuilds the `gh-aw` binary
- 3. Runs `./gh-aw init` to initialize the repository
- 4. Runs `./gh-aw compile --validate --verbose --purge` to compile all workflows
-
- **If compilation fails**:
- 1. Review the error messages for specific workflow files
- 2. Check the workflow markdown file for syntax errors
- 3. Fix issues in the workflow frontmatter or content
- 4. Re-run `make recompile`
-
- **Success criteria**: All workflows compile successfully without errors
-
- ## Workflow & Best Practices
-
- ### Execution Order
-
- Always execute tasks in this order:
- 1. Format → 2. Lint → 3. Test → 4. Recompile
-
- This order ensures that:
- - Formatting issues don't cause linting failures
- - Linting issues don't interfere with tests
- - Tests pass before recompiling workflows
- - Workflows are compiled with clean, tested code
-
- ### Iterative Fixes
-
- When fixing issues:
- 1. **Fix one category at a time** (don't jump between formatting, linting, and tests)
- 2. **Re-run the relevant check** after each fix
- 3. **Verify the fix** before moving to the next issue
- 4. **Commit progress** after completing each major step
-
- ### Common Issues
-
- #### Go Linting Issues
- - **Unused variables**: Remove or use the variable, or prefix with `_` if intentionally unused
- - **Ineffective assignments**: Remove redundant assignments
- - **Error handling**: Always check and handle errors properly
- - **Import cycles**: Refactor to break circular dependencies
-
- #### JavaScript Issues
- - **Prettier formatting**: Run `make fmt-cjs` to auto-fix
- - **ESLint violations**: Fix manually based on error messages
- - **Type errors**: Check TypeScript types and fix mismatches
-
- #### Test Failures
- - **Flaky tests**: Re-run to confirm failure is consistent
- - **Broken tests due to code changes**: Update test expectations
- - **Missing dependencies**: Run `make deps` to install
-
- #### Compilation Errors
- - **Schema validation errors**: Check workflow frontmatter against schema
- - **Missing required fields**: Add required fields to workflow frontmatter
- - **Invalid YAML**: Fix YAML syntax in workflow files
-
- ### Using Make Commands
-
- The repository uses a Makefile for all build/test/lint operations. Key commands:
-
- - `make deps` - Install Go and Node.js dependencies (~1.5 min)
- - `make deps-dev` - Install development tools including linter (~5-8 min)
- - `make build` - Build the gh-aw binary (~1.5s)
- - `make fmt` - Format all code
- - `make lint` - Run all linters (~5.5s)
- - `make test-unit` - Run Go unit tests only (~25s, faster for development)
- - `make test` - Run all Go tests including integration (~30s)
- - `make test-js` - Run JavaScript tests
- - `make test-all` - Run both Go and JavaScript tests
- - `make recompile` - Recompile all workflows
- - `make agent-finish` - Run complete validation (use this for final check)
-
- ### Final Validation
-
- Before completing your work, optionally run the full validation suite:
-
- ```bash
- make agent-finish
- ```
-
- **WARNING**: This command takes ~10-15 minutes and runs:
- - `make deps-dev` - Install dev dependencies
- - `make fmt` - Format code
- - `make lint` - Run linters
- - `make build` - Build binary
- - `make test-all` - Run all tests
- - `make recompile` - Recompile workflows
- - `make dependabot` - Generate Dependabot manifests
- - `make generate-schema-docs` - Generate schema documentation
- - `make generate-agent-factory` - Generate agent factory documentation
- - `make security-scan` - Run security scans
-
- Only run this if explicitly requested or for final verification.
-
- ## Response Style
-
- - **Concise**: Keep responses brief and focused on the current task
- - **Clear**: Explain what you're doing and why
- - **Action-oriented**: Always indicate which command you're running next
- - **Problem-solving**: When issues arise, explain the problem and your fix
-
- ## Example Workflow
-
- ```
- 1. Running code formatter...
- ✓ Code formatted successfully
-
- 2. Running linters...
- ✗ Found 3 linting issues in pkg/cli/compile.go
- - Fixing unused variable on line 45
- - Fixing ineffective assignment on line 67
- - Running linter again...
- ✓ All linters passed
-
- 3. Running Go unit tests...
- ✓ All tests passed (25s)
-
- 4. Running JavaScript tests...
- ✓ All tests passed
-
- 5. Recompiling workflows...
- ✓ Compiled 15 workflows successfully
-
- CI cleanup complete! ✨
- ```
-
- ## Guidelines
-
- - **Always run commands in sequence** - Don't skip steps
- - **Fix issues immediately** - Don't accumulate problems
- - **Verify fixes** - Re-run checks after fixing
- - **Report progress** - Keep the user informed of what you're doing
- - **Be thorough** - Don't leave any errors unresolved
- - **Use the tools** - Leverage make commands rather than manual fixes
- - **Understand before fixing** - Read error messages carefully before making changes
-
- ## Important Notes
-
- 1. **Dependencies**: Ensure dependencies are installed before running tests/linters. If commands fail due to missing tools, run `make deps` or `make deps-dev`.
-
- 2. **Build times**: Be patient with longer-running commands:
- - `make deps`: ~1.5 minutes
- - `make deps-dev`: ~5-8 minutes
- - `make test`: ~30 seconds
- - `make agent-finish`: ~10-15 minutes
-
- 3. **Integration tests**: Integration tests may be slower and require more setup. Focus on unit tests during iterative development.
-
- 4. **Don't cancel**: Let long-running commands complete. If they seem stuck, check the output for progress indicators.
-
- 5. **Commit after each major step**: Use git to commit progress after completing formatting, linting, or fixing all tests.
-
- Let's tidy up the CI! 🧹✨
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/hourly-ci-cleaner.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # CI Cleaner Agent
+
+ You are a specialized AI agent that **tidies up the repository CI state** in the `githubnext/gh-aw` repository. Your job is to ensure the codebase is clean, well-formatted, passes all linters and tests, and has all workflows properly compiled.
+
+ Read the ENTIRE content of this file carefully before proceeding. Follow the instructions precisely.
+
+ ## First Step: Check CI Status
+
+ **IMPORTANT**: Before doing any work, check if the CI is currently failing or passing by examining the workflow context provided to you.
+
+ If the workflow context indicates that **CI is passing** (e.g., `ci_status: success`):
+ 1. **STOP immediately** - Do not run any commands
+ 2. **Call the `noop` tool** (from the safe-outputs MCP server) with a message like:
+ ```
+ CI is passing on main branch - no cleanup needed
+ ```
+ 3. **Exit** - Your work is done
+
+ If the workflow context indicates that **CI is failing** (e.g., `ci_status: failure`), proceed with the cleanup tasks below.
+
+ ## Your Responsibilities
+
+ When CI is failing, you perform the following tasks in sequence to clean up the CI state:
+
+ 1. **Format sources** (Go, JavaScript, JSON)
+ 2. **Run linters** and fix any linting issues
+ 3. **Run tests** (Go unit, Go integration, JavaScript)
+ 4. **Fix test failures**
+ 5. **Recompile all workflows**
+
+ ## Detailed Task Steps
+
+ ### 1. Format Sources
+
+ Format all source code files to ensure consistent code style:
+
+ ```bash
+ make fmt
+ ```
+
+ This command runs:
+ - `make fmt-go` - Format Go code with `go fmt`
+ - `make fmt-cjs` - Format JavaScript (.cjs and .js) files in pkg/workflow/js
+ - `make fmt-json` - Format JSON files in pkg directory
+
+ **Success criteria**: The command completes without errors and reports "✓ Code formatted successfully"
+
+ ### 2. Run Linters and Fix Issues
+
+ Run all linters to check code quality:
+
+ ```bash
+ make lint
+ ```
+
+ This command runs:
+ - `make fmt-check` - Check Go code formatting
+ - `make fmt-check-json` - Check JSON file formatting
+ - `make lint-cjs` - Check JavaScript file formatting and style
+ - `make golint` - Run golangci-lint on Go code
+
+ **If linting fails**:
+ 1. Review the error messages carefully
+ 2. Fix issues one by one based on linter feedback
+ 3. For Go linting errors from `golangci-lint`:
+ - Read the error message and file location
+ - Fix the specific issue (unused variables, ineffective assignments, etc.)
+ - Re-run `make lint` to verify the fix
+ 4. For JavaScript linting errors:
+ - Check the formatting with `cd pkg/workflow/js && npm run lint:cjs`
+ - Fix any issues reported
+ - Re-run `make fmt-cjs` if needed
+ 5. For formatting issues:
+ - Run `make fmt` to auto-fix formatting
+ - Re-run `make lint` to verify
+
+ **Success criteria**: All linters pass and report "✓ All validations passed"
+
+ ### 3. Run Go Tests
+
+ Run Go unit tests (faster, recommended for iterative development):
+
+ ```bash
+ make test-unit
+ ```
+
+ Run all Go tests including integration tests:
+
+ ```bash
+ make test
+ ```
+
+ **If tests fail**:
+ 1. Review the test failure output carefully
+ 2. Identify which test(s) failed and why
+ 3. Fix the underlying issue:
+ - For logic errors: Fix the implementation
+ - For test errors: Update the test if expectations changed
+ - For compilation errors: Fix syntax/type issues
+ 4. Re-run the specific test or test package to verify:
+ ```bash
+ go test -v ./pkg/path/to/package/...
+ ```
+ 5. Once fixed, run `make test-unit` or `make test` again
+
+ **Success criteria**: All tests pass with no failures
+
+ ### 4. Run JavaScript Tests
+
+ Run JavaScript tests for workflow files:
+
+ ```bash
+ make test-js
+ ```
+
+ **If tests fail**:
+ 1. Review the test failure output
+ 2. Check if the issue is in:
+ - JavaScript source files in `pkg/workflow/js/`
+ - Test files
+ - Type definitions
+ 3. Fix the issue and re-run `make test-js`
+
+ **Success criteria**: All JavaScript tests pass
+
+ ### 5. Recompile All Workflows
+
+ Recompile all workflow markdown files to YAML lock files:
+
+ ```bash
+ make recompile
+ ```
+
+ This command:
+ 1. Syncs templates from `.github` to `pkg/cli/templates`
+ 2. Rebuilds the `gh-aw` binary
+ 3. Runs `./gh-aw init` to initialize the repository
+ 4. Runs `./gh-aw compile --validate --verbose --purge` to compile all workflows
+
+ **If compilation fails**:
+ 1. Review the error messages for specific workflow files
+ 2. Check the workflow markdown file for syntax errors
+ 3. Fix issues in the workflow frontmatter or content
+ 4. Re-run `make recompile`
+
+ **Success criteria**: All workflows compile successfully without errors
+
+ ## Workflow & Best Practices
+
+ ### Execution Order
+
+ Always execute tasks in this order:
+ 1. Format → 2. Lint → 3. Test → 4. Recompile
+
+ This order ensures that:
+ - Formatting issues don't cause linting failures
+ - Linting issues don't interfere with tests
+ - Tests pass before recompiling workflows
+ - Workflows are compiled with clean, tested code
+
+ ### Iterative Fixes
+
+ When fixing issues:
+ 1. **Fix one category at a time** (don't jump between formatting, linting, and tests)
+ 2. **Re-run the relevant check** after each fix
+ 3. **Verify the fix** before moving to the next issue
+ 4. **Commit progress** after completing each major step
+
+ ### Common Issues
+
+ #### Go Linting Issues
+ - **Unused variables**: Remove or use the variable, or prefix with `_` if intentionally unused
+ - **Ineffective assignments**: Remove redundant assignments
+ - **Error handling**: Always check and handle errors properly
+ - **Import cycles**: Refactor to break circular dependencies
+
+ #### JavaScript Issues
+ - **Prettier formatting**: Run `make fmt-cjs` to auto-fix
+ - **ESLint violations**: Fix manually based on error messages
+ - **Type errors**: Check TypeScript types and fix mismatches
+
+ #### Test Failures
+ - **Flaky tests**: Re-run to confirm failure is consistent
+ - **Broken tests due to code changes**: Update test expectations
+ - **Missing dependencies**: Run `make deps` to install
+
+ #### Compilation Errors
+ - **Schema validation errors**: Check workflow frontmatter against schema
+ - **Missing required fields**: Add required fields to workflow frontmatter
+ - **Invalid YAML**: Fix YAML syntax in workflow files
+
+ ### Using Make Commands
+
+ The repository uses a Makefile for all build/test/lint operations. Key commands:
+
+ - `make deps` - Install Go and Node.js dependencies (~1.5 min)
+ - `make deps-dev` - Install development tools including linter (~5-8 min)
+ - `make build` - Build the gh-aw binary (~1.5s)
+ - `make fmt` - Format all code
+ - `make lint` - Run all linters (~5.5s)
+ - `make test-unit` - Run Go unit tests only (~25s, faster for development)
+ - `make test` - Run all Go tests including integration (~30s)
+ - `make test-js` - Run JavaScript tests
+ - `make test-all` - Run both Go and JavaScript tests
+ - `make recompile` - Recompile all workflows
+ - `make agent-finish` - Run complete validation (use this for final check)
+
+ ### Final Validation
+
+ Before completing your work, optionally run the full validation suite:
+
+ ```bash
+ make agent-finish
+ ```
+
+ **WARNING**: This command takes ~10-15 minutes and runs:
+ - `make deps-dev` - Install dev dependencies
+ - `make fmt` - Format code
+ - `make lint` - Run linters
+ - `make build` - Build binary
+ - `make test-all` - Run all tests
+ - `make recompile` - Recompile workflows
+ - `make dependabot` - Generate Dependabot manifests
+ - `make generate-schema-docs` - Generate schema documentation
+ - `make generate-agent-factory` - Generate agent factory documentation
+ - `make security-scan` - Run security scans
+
+ Only run this if explicitly requested or for final verification.
+
+ ## Response Style
+
+ - **Concise**: Keep responses brief and focused on the current task
+ - **Clear**: Explain what you're doing and why
+ - **Action-oriented**: Always indicate which command you're running next
+ - **Problem-solving**: When issues arise, explain the problem and your fix
+
+ ## Example Workflow
+
+ ```
+ 1. Running code formatter...
+ ✓ Code formatted successfully
+
+ 2. Running linters...
+ ✗ Found 3 linting issues in pkg/cli/compile.go
+ - Fixing unused variable on line 45
+ - Fixing ineffective assignment on line 67
+ - Running linter again...
+ ✓ All linters passed
+
+ 3. Running Go unit tests...
+ ✓ All tests passed (25s)
+
+ 4. Running JavaScript tests...
+ ✓ All tests passed
+
+ 5. Recompiling workflows...
+ ✓ Compiled 15 workflows successfully
+
+ CI cleanup complete! ✨
+ ```
+
+ ## Guidelines
+
+ - **Always run commands in sequence** - Don't skip steps
+ - **Fix issues immediately** - Don't accumulate problems
+ - **Verify fixes** - Re-run checks after fixing
+ - **Report progress** - Keep the user informed of what you're doing
+ - **Be thorough** - Don't leave any errors unresolved
+ - **Use the tools** - Leverage make commands rather than manual fixes
+ - **Understand before fixing** - Read error messages carefully before making changes
+
+ ## Important Notes
+
+ 1. **Dependencies**: Ensure dependencies are installed before running tests/linters. If commands fail due to missing tools, run `make deps` or `make deps-dev`.
+
+ 2. **Build times**: Be patient with longer-running commands:
+ - `make deps`: ~1.5 minutes
+ - `make deps-dev`: ~5-8 minutes
+ - `make test`: ~30 seconds
+ - `make agent-finish`: ~10-15 minutes
+
+ 3. **Integration tests**: Integration tests may be slower and require more setup. Focus on unit tests during iterative development.
+
+ 4. **Don't cancel**: Let long-running commands complete. If they seem stuck, check the output for progress indicators.
+
+ 5. **Commit after each major step**: Use git to commit progress after completing formatting, linting, or fixing all tests.
+
+ Let's tidy up the CI! 🧹✨
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/hourly-ci-cleaner.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/instructions-janitor.lock.yml b/.github/workflows/instructions-janitor.lock.yml
index 068f181138..2eb8a4ac95 100644
--- a/.github/workflows/instructions-janitor.lock.yml
+++ b/.github/workflows/instructions-janitor.lock.yml
@@ -501,63 +501,65 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/instructions-janitor.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/instructions-janitor.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/issue-arborist.lock.yml b/.github/workflows/issue-arborist.lock.yml
index db5a8550c9..4f4429944d 100644
--- a/.github/workflows/issue-arborist.lock.yml
+++ b/.github/workflows/issue-arborist.lock.yml
@@ -631,151 +631,153 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/issue-arborist.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/issue-arborist.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml
index 914fc682a9..2a2b9a7167 100644
--- a/.github/workflows/issue-classifier.lock.yml
+++ b/.github/workflows/issue-classifier.lock.yml
@@ -477,67 +477,69 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/issue-classifier.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/issue-classifier.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/issue-monster.lock.yml b/.github/workflows/issue-monster.lock.yml
index 88075d26af..334468ef4e 100644
--- a/.github/workflows/issue-monster.lock.yml
+++ b/.github/workflows/issue-monster.lock.yml
@@ -514,62 +514,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/issue-monster.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/issue-monster.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml
index 32f6a7a084..5d3af10a74 100644
--- a/.github/workflows/issue-triage-agent.lock.yml
+++ b/.github/workflows/issue-triage-agent.lock.yml
@@ -479,135 +479,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/issue-triage-agent.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/issue-triage-agent.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml
index 4967f3f401..2aab7306a5 100644
--- a/.github/workflows/jsweep.lock.yml
+++ b/.github/workflows/jsweep.lock.yml
@@ -515,63 +515,65 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/jsweep.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/jsweep.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/layout-spec-maintainer.lock.yml b/.github/workflows/layout-spec-maintainer.lock.yml
index 6b86686eba..e5e9d7b0ca 100644
--- a/.github/workflows/layout-spec-maintainer.lock.yml
+++ b/.github/workflows/layout-spec-maintainer.lock.yml
@@ -494,62 +494,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/layout-spec-maintainer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/layout-spec-maintainer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml
index c29ca2d6de..8b1040d784 100644
--- a/.github/workflows/lockfile-stats.lock.yml
+++ b/.github/workflows/lockfile-stats.lock.yml
@@ -495,136 +495,138 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/lockfile-stats.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/lockfile-stats.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml
index f6f0e96d8a..dbe6581b4d 100644
--- a/.github/workflows/mcp-inspector.lock.yml
+++ b/.github/workflows/mcp-inspector.lock.yml
@@ -774,276 +774,278 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## ast-grep MCP Server
-
- ast-grep is a powerful structural search and replace tool for code. It uses tree-sitter grammars to parse and search code based on its structure rather than just text patterns.
-
- ### Available Tools
-
- The ast-grep MCP server provides MCP tools for structural code analysis. The specific tools exposed by the server can be discovered using the MCP protocol. This server enables:
- - Searching code patterns using tree-sitter grammars
- - Structural code analysis
- - Pattern-based code transformations
-
- ### Basic Usage
-
- The MCP server exposes ast-grep functionality through its MCP tools interface. When using ast-grep in your workflow, you can perform structural searches across multiple programming languages (Go, JavaScript, TypeScript, Python, etc.) with pattern matching based on code structure rather than text.
-
- **Example patterns that can be searched:**
-
- 1. **Unmarshal with dash tag** (problematic Go pattern):
- - Pattern: `json:"-"`
- - Reference: https://ast-grep.github.io/catalog/go/unmarshal-tag-is-dash.html
-
- 2. **Error handling patterns:**
- - Pattern: `if err != nil { $$$A }`
-
- 3. **Function call patterns:**
- - Pattern: `functionName($$$ARGS)`
-
- ### More Information
-
- - Documentation: https://ast-grep.github.io/
- - Go patterns catalog: https://ast-grep.github.io/catalog/go/
- - Pattern syntax guide: https://ast-grep.github.io/guide/pattern-syntax.html
- - Docker image: https://hub.docker.com/r/mcp/ast-grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ## Slack Integration
-
- This shared configuration provides a custom safe-job for posting messages to Slack channels.
-
- ### Safe Job: post-to-slack-channel
-
- The `post-to-slack-channel` safe-job allows agentic workflows to post messages to Slack channels through the Slack API.
-
- **Agent Output Format:**
-
- The agent should output JSON with items of type `post_to_slack_channel`:
-
- ```json
{
- "items": [
- {
- "type": "post_to_slack_channel",
- "message": "Your message here (max 200 characters)"
- }
- ]
- }
- ```
-
- **Required Environment Variable:**
- - `GH_AW_SLACK_CHANNEL_ID`: The Slack channel ID (e.g., C1234567890) where messages will be posted
-
- **Message Field:**
- - `message`: The message text to post (maximum 200 characters)
-
- **Message Length Limit:**
- Messages are limited to 200 characters to ensure concise, focused updates. Items with messages exceeding this limit will be skipped with a warning.
-
- **Supported Slack Markdown:**
- The message supports basic Slack markdown syntax:
- - `*bold*` - Bold text
- - `_italic_` - Italic text
- - `~strike~` - Strikethrough text
- - `` `code` `` - Inline code
- - ` ```code block``` ` - Code block
- - `>quote` - Block quote
- - `` - Hyperlink with custom text
-
- **Example Usage in Workflow:**
-
- ```
- Please post a summary using the post_to_slack_channel output type.
- Keep the message under 200 characters.
- ```
-
- Note: The `GH_AW_SLACK_CHANNEL_ID` environment variable must be set in your workflow configuration or repository environment variables.
-
- **Staged Mode Support:**
-
- This safe-job fully supports staged mode. When `staged: true` is set in the workflow's safe-outputs configuration, messages will be previewed in the step summary instead of being posted to Slack.
-
- ### Setup
-
- 1. **Create a Slack App** with a Bot User OAuth Token:
- - Go to https://api.slack.com/apps
- - Create a new app or select an existing one
- - Navigate to "OAuth & Permissions"
- - Add the `chat:write` bot token scope
- - Install the app to your workspace
- - Copy the "Bot User OAuth Token" (starts with `xoxb-`)
-
- 2. **Add the bot to your channel**:
- - In Slack, go to the channel where you want to post messages
- - Type `/invite @YourBotName` to add the bot
- - Get the channel ID from the channel details
-
- 3. **Configure GitHub Secrets and Environment Variables**:
- - Add `SLACK_BOT_TOKEN` secret to your repository with the Bot User OAuth Token
- - Add `GH_AW_SLACK_CHANNEL_ID` as an environment variable or repository variable with the Slack channel ID
-
- 4. **Include this configuration in your workflow**:
- ```yaml
- imports:
- - shared/mcp/slack.md
- ```
-
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/mcp-inspector.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## ast-grep MCP Server
+
+ ast-grep is a powerful structural search and replace tool for code. It uses tree-sitter grammars to parse and search code based on its structure rather than just text patterns.
+
+ ### Available Tools
+
+ The ast-grep MCP server provides MCP tools for structural code analysis. The specific tools exposed by the server can be discovered using the MCP protocol. This server enables:
+ - Searching code patterns using tree-sitter grammars
+ - Structural code analysis
+ - Pattern-based code transformations
+
+ ### Basic Usage
+
+ The MCP server exposes ast-grep functionality through its MCP tools interface. When using ast-grep in your workflow, you can perform structural searches across multiple programming languages (Go, JavaScript, TypeScript, Python, etc.) with pattern matching based on code structure rather than text.
+
+ **Example patterns that can be searched:**
+
+ 1. **Unmarshal with dash tag** (problematic Go pattern):
+ - Pattern: `json:"-"`
+ - Reference: https://ast-grep.github.io/catalog/go/unmarshal-tag-is-dash.html
+
+ 2. **Error handling patterns:**
+ - Pattern: `if err != nil { $$$A }`
+
+ 3. **Function call patterns:**
+ - Pattern: `functionName($$$ARGS)`
+
+ ### More Information
+
+ - Documentation: https://ast-grep.github.io/
+ - Go patterns catalog: https://ast-grep.github.io/catalog/go/
+ - Pattern syntax guide: https://ast-grep.github.io/guide/pattern-syntax.html
+ - Docker image: https://hub.docker.com/r/mcp/ast-grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ## Slack Integration
+
+ This shared configuration provides a custom safe-job for posting messages to Slack channels.
+
+ ### Safe Job: post-to-slack-channel
+
+ The `post-to-slack-channel` safe-job allows agentic workflows to post messages to Slack channels through the Slack API.
+
+ **Agent Output Format:**
+
+ The agent should output JSON with items of type `post_to_slack_channel`:
+
+ ```json
+ {
+ "items": [
+ {
+ "type": "post_to_slack_channel",
+ "message": "Your message here (max 200 characters)"
+ }
+ ]
+ }
+ ```
+
+ **Required Environment Variable:**
+ - `GH_AW_SLACK_CHANNEL_ID`: The Slack channel ID (e.g., C1234567890) where messages will be posted
+
+ **Message Field:**
+ - `message`: The message text to post (maximum 200 characters)
+
+ **Message Length Limit:**
+ Messages are limited to 200 characters to ensure concise, focused updates. Items with messages exceeding this limit will be skipped with a warning.
+
+ **Supported Slack Markdown:**
+ The message supports basic Slack markdown syntax:
+ - `*bold*` - Bold text
+ - `_italic_` - Italic text
+ - `~strike~` - Strikethrough text
+ - `` `code` `` - Inline code
+ - ` ```code block``` ` - Code block
+ - `>quote` - Block quote
+ - `` - Hyperlink with custom text
+
+ **Example Usage in Workflow:**
+
+ ```
+ Please post a summary using the post_to_slack_channel output type.
+ Keep the message under 200 characters.
+ ```
+
+ Note: The `GH_AW_SLACK_CHANNEL_ID` environment variable must be set in your workflow configuration or repository environment variables.
+
+ **Staged Mode Support:**
+
+ This safe-job fully supports staged mode. When `staged: true` is set in the workflow's safe-outputs configuration, messages will be previewed in the step summary instead of being posted to Slack.
+
+ ### Setup
+
+ 1. **Create a Slack App** with a Bot User OAuth Token:
+ - Go to https://api.slack.com/apps
+ - Create a new app or select an existing one
+ - Navigate to "OAuth & Permissions"
+ - Add the `chat:write` bot token scope
+ - Install the app to your workspace
+ - Copy the "Bot User OAuth Token" (starts with `xoxb-`)
+
+ 2. **Add the bot to your channel**:
+ - In Slack, go to the channel where you want to post messages
+ - Type `/invite @YourBotName` to add the bot
+ - Get the channel ID from the channel details
+
+ 3. **Configure GitHub Secrets and Environment Variables**:
+ - Add `SLACK_BOT_TOKEN` secret to your repository with the Bot User OAuth Token
+ - Add `GH_AW_SLACK_CHANNEL_ID` as an environment variable or repository variable with the Slack channel ID
+
+ 4. **Include this configuration in your workflow**:
+ ```yaml
+ imports:
+ - shared/mcp/slack.md
+ ```
+
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/mcp-inspector.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml
index 5550e445f0..7eec39b6ee 100644
--- a/.github/workflows/mergefest.lock.yml
+++ b/.github/workflows/mergefest.lock.yml
@@ -495,65 +495,67 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/mergefest.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/mergefest.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml
index a1400d5d1c..e8d49733ba 100644
--- a/.github/workflows/metrics-collector.lock.yml
+++ b/.github/workflows/metrics-collector.lock.yml
@@ -295,72 +295,74 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/meta-orchestrators` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: metrics/**
- - **Max File Size**: 10240 bytes (0.01 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/metrics-collector.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/meta-orchestrators` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: metrics/**
+ - **Max File Size**: 10240 bytes (0.01 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/metrics-collector.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml
index 12cb8d2efb..196371b054 100644
--- a/.github/workflows/notion-issue-summary.lock.yml
+++ b/.github/workflows/notion-issue-summary.lock.yml
@@ -461,67 +461,69 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/notion-issue-summary.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/notion-issue-summary.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml
index 4d44beef2c..43d3d5e10e 100644
--- a/.github/workflows/org-health-report.lock.yml
+++ b/.github/workflows/org-health-report.lock.yml
@@ -538,470 +538,472 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/org-health-report.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/org-health-report.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml
index 7153c492ab..e1d9b8ddf0 100644
--- a/.github/workflows/pdf-summary.lock.yml
+++ b/.github/workflows/pdf-summary.lock.yml
@@ -583,71 +583,73 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/pdf-summary.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/pdf-summary.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml
index c2f285b696..65af15b5d2 100644
--- a/.github/workflows/plan.lock.yml
+++ b/.github/workflows/plan.lock.yml
@@ -589,65 +589,67 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/plan.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/plan.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml
index ec8495ecc3..372ae7409d 100644
--- a/.github/workflows/poem-bot.lock.yml
+++ b/.github/workflows/poem-bot.lock.yml
@@ -1072,139 +1072,141 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/poem-bot.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/poem-bot.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml
index c01572ee3f..fbd84edc7b 100644
--- a/.github/workflows/portfolio-analyst.lock.yml
+++ b/.github/workflows/portfolio-analyst.lock.yml
@@ -578,266 +578,268 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- # Python Environment Ready
-
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
- Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
-
- ## Store Historical Data (JSON Lines)
-
- ```python
- import json
- from datetime import datetime
-
- # Append data point
- with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
- f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
- ```
-
- ## Generate Charts
-
- ```python
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- df = pd.read_json('history.jsonl', lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
-
- sns.set_style("whitegrid")
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
- ax.set_title('Trend', fontsize=16, fontweight='bold')
- plt.xticks(rotation=45)
- plt.tight_layout()
- plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
- ```
-
- ## Best Practices
-
- - Use JSON Lines (`.jsonl`) for append-only storage
- - Include ISO 8601 timestamps in all data points
- - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
- - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/portfolio-analyst.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ # Python Environment Ready
+
+ Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
+ Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
+
+ ## Store Historical Data (JSON Lines)
+
+ ```python
+ import json
+ from datetime import datetime
+
+ # Append data point
+ with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
+ f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
+ ```
+
+ ## Generate Charts
+
+ ```python
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ df = pd.read_json('history.jsonl', lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+
+ sns.set_style("whitegrid")
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
+ ax.set_title('Trend', fontsize=16, fontweight='bold')
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+ plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ## Best Practices
+
+ - Use JSON Lines (`.jsonl`) for append-only storage
+ - Include ISO 8601 timestamps in all data points
+ - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
+ - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/portfolio-analyst.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml
index 847cf9fb73..e38c9dfcf3 100644
--- a/.github/workflows/pr-nitpick-reviewer.lock.yml
+++ b/.github/workflows/pr-nitpick-reviewer.lock.yml
@@ -650,139 +650,141 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/pr-nitpick-reviewer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/pr-nitpick-reviewer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/pr-triage-agent.lock.yml b/.github/workflows/pr-triage-agent.lock.yml
index 9fca6b2438..bfb0764ad1 100644
--- a/.github/workflows/pr-triage-agent.lock.yml
+++ b/.github/workflows/pr-triage-agent.lock.yml
@@ -555,87 +555,89 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Repo Memory Available
-
- You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
-
- - **Read/Write Access**: You can freely read from and write to any files in this folder
- - **Git Branch Storage**: Files are stored in the `memory/pr-triage` branch of the current repository
- - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
- - **Merge Strategy**: In case of conflicts, your changes (current version) win
- - **Persistence**: Files persist across workflow runs via git branch storage
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: **
- - **Max File Size**: 102400 bytes (0.10 MB) per file
- - **Max File Count**: 100 files per commit
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/pr-triage-agent.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Repo Memory Available
+
+ You have access to a persistent repo memory folder at `/tmp/gh-aw/repo-memory/default/` where you can read and write files that are stored in a git branch.
+
+ - **Read/Write Access**: You can freely read from and write to any files in this folder
+ - **Git Branch Storage**: Files are stored in the `memory/pr-triage` branch of the current repository
+ - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes
+ - **Merge Strategy**: In case of conflicts, your changes (current version) win
+ - **Persistence**: Files persist across workflow runs via git branch storage
+
+ **Constraints:**
+ - **Allowed Files**: Only files matching patterns: **
+ - **Max File Size**: 102400 bytes (0.10 MB) per file
+ - **Max File Count**: 100 files per commit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/repo-memory/default/notes.md` - general notes and observations
+ - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
+ - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories
+
+ Feel free to create, read, update, and organize files in this folder as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/pr-triage-agent.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/prompt-clustering-analysis.lock.yml b/.github/workflows/prompt-clustering-analysis.lock.yml
index ce047be0f4..4319d5433a 100644
--- a/.github/workflows/prompt-clustering-analysis.lock.yml
+++ b/.github/workflows/prompt-clustering-analysis.lock.yml
@@ -572,268 +572,270 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## jqschema - JSON Schema Discovery
-
- A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
-
- ### Purpose
-
- Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
- - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
- - Exploring API responses with large payloads
- - Understanding the structure of unfamiliar data without verbose output
- - Planning queries before fetching full data
-
- ### Usage
-
- ```bash
- # Analyze a file
- cat data.json | /tmp/gh-aw/jqschema.sh
-
- # Analyze command output
- echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
-
- # Analyze GitHub search results
- gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
- ```
-
- ### How It Works
-
- The script transforms JSON data by:
- 1. Replacing object values with their type names ("string", "number", "boolean", "null")
- 2. Reducing arrays to their first element's structure (or empty array if empty)
- 3. Recursively processing nested structures
- 4. Outputting compact (minified) JSON
-
- ### Example
-
- **Input:**
- ```json
{
- "total_count": 1000,
- "items": [
- {"login": "user1", "id": 123, "verified": true},
- {"login": "user2", "id": 456, "verified": false}
- ]
- }
- ```
-
- **Output:**
- ```json
- {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
- ```
-
- ### Best Practices
-
- **Use this script when:**
- - You need to understand the structure of tool outputs before requesting full data
- - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
- - Exploring unfamiliar APIs or data structures
- - Planning data extraction strategies
-
- **Example workflow for GitHub search tools:**
- ```bash
- # Step 1: Get schema with minimal data (fetch just 1 result)
- # This helps understand the structure before requesting large datasets
- echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
-
- # Output shows the schema:
- # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
-
- # Step 2: Review schema to understand available fields
-
- # Step 3: Request full data with confidence about structure
- # Now you know what fields are available and can query efficiently
- ```
-
- **Using with GitHub MCP tools:**
- When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
- ```bash
- # Save a minimal search result to a file
- gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
-
- # Generate schema to understand structure
- cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
-
- # Now you know which fields exist and can use them in your analysis
- ```
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
-
-
-
- # Python Environment Ready
-
- Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
- Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
-
- ## Store Historical Data (JSON Lines)
-
- ```python
- import json
- from datetime import datetime
-
- # Append data point
- with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
- f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
- ```
-
- ## Generate Charts
-
- ```python
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- df = pd.read_json('history.jsonl', lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
-
- sns.set_style("whitegrid")
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
- ax.set_title('Trend', fontsize=16, fontweight='bold')
- plt.xticks(rotation=45)
- plt.tight_layout()
- plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
- ```
-
- ## Best Practices
-
- - Use JSON Lines (`.jsonl`) for append-only storage
- - Include ISO 8601 timestamps in all data points
- - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
- - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/prompt-clustering-analysis.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## jqschema - JSON Schema Discovery
+
+ A utility script is available at `/tmp/gh-aw/jqschema.sh` to help you discover the structure of complex JSON responses.
+
+ ### Purpose
+
+ Generate a compact structural schema (keys + types) from JSON input. This is particularly useful when:
+ - Analyzing tool outputs from GitHub search (search_code, search_issues, search_repositories)
+ - Exploring API responses with large payloads
+ - Understanding the structure of unfamiliar data without verbose output
+ - Planning queries before fetching full data
+
+ ### Usage
+
+ ```bash
+ # Analyze a file
+ cat data.json | /tmp/gh-aw/jqschema.sh
+
+ # Analyze command output
+ echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
+
+ # Analyze GitHub search results
+ gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
+ ```
+
+ ### How It Works
+
+ The script transforms JSON data by:
+ 1. Replacing object values with their type names ("string", "number", "boolean", "null")
+ 2. Reducing arrays to their first element's structure (or empty array if empty)
+ 3. Recursively processing nested structures
+ 4. Outputting compact (minified) JSON
+
+ ### Example
+
+ **Input:**
+ ```json
+ {
+ "total_count": 1000,
+ "items": [
+ {"login": "user1", "id": 123, "verified": true},
+ {"login": "user2", "id": 456, "verified": false}
+ ]
+ }
+ ```
+
+ **Output:**
+ ```json
+ {"total_count":"number","items":[{"login":"string","id":"number","verified":"boolean"}]}
+ ```
+
+ ### Best Practices
+
+ **Use this script when:**
+ - You need to understand the structure of tool outputs before requesting full data
+ - GitHub search tools return large datasets (use `perPage: 1` and pipe through schema minifier first)
+ - Exploring unfamiliar APIs or data structures
+ - Planning data extraction strategies
+
+ **Example workflow for GitHub search tools:**
+ ```bash
+ # Step 1: Get schema with minimal data (fetch just 1 result)
+ # This helps understand the structure before requesting large datasets
+ echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
+
+ # Output shows the schema:
+ # {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
+
+ # Step 2: Review schema to understand available fields
+
+ # Step 3: Request full data with confidence about structure
+ # Now you know what fields are available and can query efficiently
+ ```
+
+ **Using with GitHub MCP tools:**
+ When using tools like `search_code`, `search_issues`, or `search_repositories`, pipe the output through jqschema to discover available fields:
+ ```bash
+ # Save a minimal search result to a file
+ gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json
+
+ # Generate schema to understand structure
+ cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
+
+ # Now you know which fields exist and can use them in your analysis
+ ```
+
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+
+
+
+ # Python Environment Ready
+
+ Libraries: NumPy, Pandas, Matplotlib, Seaborn, SciPy
+ Directories: `/tmp/gh-aw/python/{data,charts,artifacts}`, `/tmp/gh-aw/cache-memory/`
+
+ ## Store Historical Data (JSON Lines)
+
+ ```python
+ import json
+ from datetime import datetime
+
+ # Append data point
+ with open('/tmp/gh-aw/cache-memory/trending//history.jsonl', 'a') as f:
+ f.write(json.dumps({"timestamp": datetime.now().isoformat(), "value": 42}) + '\n')
+ ```
+
+ ## Generate Charts
+
+ ```python
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ df = pd.read_json('history.jsonl', lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+
+ sns.set_style("whitegrid")
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ df.groupby('date')['value'].mean().plot(ax=ax, marker='o')
+ ax.set_title('Trend', fontsize=16, fontweight='bold')
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+ plt.savefig('/tmp/gh-aw/python/charts/trend.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ## Best Practices
+
+ - Use JSON Lines (`.jsonl`) for append-only storage
+ - Include ISO 8601 timestamps in all data points
+ - Implement 90-day retention: `df[df['timestamp'] >= cutoff_date]`
+ - Charts: 300 DPI, 12x7 inches, clear labels, seaborn style
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/prompt-clustering-analysis.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml
index b0d5ebcbb9..adf8af9d54 100644
--- a/.github/workflows/python-data-charts.lock.yml
+++ b/.github/workflows/python-data-charts.lock.yml
@@ -578,890 +578,892 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- # Charts with Trending - Complete Guide
-
- This shared workflow provides everything you need to create compelling trend visualizations with persistent data storage.
-
- > [!TIP]
- > **Quick Start Alternative**
- >
- > Looking for a simpler setup? Use `shared/trending-charts-simple.md` for:
- > - No nested imports (standalone configuration)
- > - No network restrictions (strict mode compatible)
- > - Quick start examples for common trending patterns
- > - Minimal configuration overhead
- >
- > The simplified version is perfect for basic trending needs while this comprehensive version offers advanced patterns and best practices.
-
- ## Cache-Memory for Trending Data
-
- You have access to persistent cache-memory at `/tmp/gh-aw/cache-memory/` that survives across workflow runs. Use it to store historical trending data.
-
- ### Trending Data Organization
-
- Organize your trending data in cache-memory:
-
- ```
- /tmp/gh-aw/cache-memory/
- ├── trending/
- │ ├── /
- │ │ ├── history.jsonl # Time-series data (JSON Lines format)
- │ │ ├── metadata.json # Data schema and descriptions
- │ │ └── last_updated.txt # Timestamp of last update
- │ └── index.json # Index of all tracked metrics
- ```
-
- ### Helper Functions for Trending Data
-
- **Load Historical Data:**
- ```bash
- # Check if historical data exists
- if [ -f /tmp/gh-aw/cache-memory/trending/issues/history.jsonl ]; then
- echo "Loading historical issue trending data..."
- cp /tmp/gh-aw/cache-memory/trending/issues/history.jsonl /tmp/gh-aw/python/data/
- else
- echo "No historical data found. Starting fresh."
- mkdir -p /tmp/gh-aw/cache-memory/trending/issues
- fi
- ```
-
- **Append New Data:**
- ```python
- import json
- from datetime import datetime
-
- # New data point
- data_point = {
- "timestamp": datetime.now().isoformat(),
- "metric": "issue_count",
- "value": 42,
- "metadata": {"source": "github_api"}
- }
-
- # Append to history (JSON Lines format)
- with open('/tmp/gh-aw/cache-memory/trending/issues/history.jsonl', 'a') as f:
- f.write(json.dumps(data_point) + '\n')
- ```
-
- **Load All Historical Data for Analysis:**
- ```python
- import pandas as pd
- import json
-
- # Load all historical data
- data_points = []
- history_file = '/tmp/gh-aw/cache-memory/trending/issues/history.jsonl'
-
- if os.path.exists(history_file):
- with open(history_file, 'r') as f:
- for line in f:
- data_points.append(json.loads(line))
-
- # Convert to DataFrame for analysis
- df = pd.DataFrame(data_points)
- df['timestamp'] = pd.to_datetime(df['timestamp'])
- df = df.sort_values('timestamp')
- else:
- df = pd.DataFrame() # Empty if no history
- ```
-
- ## Trending Analysis Patterns
-
- ### Pattern 1: Daily Metrics Tracking
-
- Track daily metrics and visualize trends over time:
-
- ```python
- #!/usr/bin/env python3
- """
- Daily metrics trending example
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
- import json
- import os
- from datetime import datetime
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load historical data
- history_file = '/tmp/gh-aw/cache-memory/trending/daily_metrics/history.jsonl'
- if os.path.exists(history_file):
- data = pd.read_json(history_file, lines=True)
- data['date'] = pd.to_datetime(data['timestamp']).dt.date
- else:
- data = pd.DataFrame()
-
- # Add today's data
- today_data = {
- "timestamp": datetime.now().isoformat(),
- "issues_opened": 5,
- "issues_closed": 3,
- "prs_merged": 2
- }
-
- # Append to history
- os.makedirs(os.path.dirname(history_file), exist_ok=True)
- with open(history_file, 'a') as f:
- f.write(json.dumps(today_data) + '\n')
-
- # Reload with today's data
- data = pd.read_json(history_file, lines=True)
- data['date'] = pd.to_datetime(data['timestamp']).dt.date
- daily_stats = data.groupby('date').sum()
-
- # Create trend chart
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- daily_stats.plot(ax=ax, marker='o', linewidth=2)
- ax.set_title('Daily Metrics Trends', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Count', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- plt.tight_layout()
-
- plt.savefig('/tmp/gh-aw/python/charts/daily_metrics_trend.png',
- dpi=300, bbox_inches='tight', facecolor='white')
-
- print(f"Chart saved. Total data points: {len(data)}")
- ```
-
- ### Pattern 2: Moving Averages and Smoothing
-
- ```python
- # Calculate 7-day moving average
- df['rolling_avg'] = df['value'].rolling(window=7, min_periods=1).mean()
-
- # Plot with trend line
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(df['date'], df['value'], label='Actual', alpha=0.5, marker='o')
- ax.plot(df['date'], df['rolling_avg'], label='7-day Average', linewidth=2.5)
- ax.fill_between(df['date'], df['value'], df['rolling_avg'], alpha=0.2)
- ```
-
- ### Pattern 3: Comparative Trends
-
- ```python
- # Compare multiple metrics over time
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- for metric in ['metric_a', 'metric_b', 'metric_c']:
- metric_data = df[df['metric'] == metric]
- ax.plot(metric_data['timestamp'], metric_data['value'],
- marker='o', label=metric, linewidth=2)
-
- ax.set_title('Comparative Metrics Trends', fontsize=16, fontweight='bold')
- ax.legend(loc='best', fontsize=12)
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ## Best Practices for Cache-Memory Trending
-
- ### 1. Use JSON Lines Format
-
- JSON Lines (`.jsonl`) is ideal for append-only trending data:
- - One JSON object per line
- - Easy to append new data
- - Efficient for time-series data
- - Simple to load with pandas: `pd.read_json(file, lines=True)`
-
- ### 2. Include Metadata
-
- Store metadata alongside data:
- ```json
{
- "metric_name": "issue_resolution_time",
- "unit": "hours",
- "description": "Average time to close issues",
- "started_tracking": "2024-01-01",
- "updated": "2024-03-15"
- }
- ```
-
- ### 3. Maintain Index
-
- Keep an index of all tracked metrics:
- ```json
- {
- "metrics": [
- "issue_count",
- "pr_count",
- "commit_count",
- "test_coverage"
- ],
- "last_updated": "2024-03-15T10:30:00Z"
- }
- ```
-
- ### 4. Data Retention Strategy
-
- Implement retention policies to prevent unbounded growth:
- ```python
- # Keep only last 90 days
- cutoff_date = datetime.now() - timedelta(days=90)
- df = df[df['timestamp'] >= cutoff_date]
-
- # Save pruned data
- df.to_json('/tmp/gh-aw/cache-memory/trending/history.jsonl',
- orient='records', lines=True)
- ```
-
- ## Complete Trending Workflow Example
-
- ```python
- #!/usr/bin/env python3
- """
- Complete trending analysis workflow
- Collects data, updates history, generates trend charts
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
- import json
- import os
- from datetime import datetime, timedelta
-
- # Configuration
- CACHE_DIR = '/tmp/gh-aw/cache-memory/trending'
- METRIC_NAME = 'github_activity'
- HISTORY_FILE = f'{CACHE_DIR}/{METRIC_NAME}/history.jsonl'
- CHARTS_DIR = '/tmp/gh-aw/python/charts'
-
- # Ensure directories exist
- os.makedirs(f'{CACHE_DIR}/{METRIC_NAME}', exist_ok=True)
- os.makedirs(CHARTS_DIR, exist_ok=True)
-
- # Collect today's data (example)
- today_data = {
- "timestamp": datetime.now().isoformat(),
- "issues_opened": 8,
- "prs_merged": 12,
- "commits": 45,
- "contributors": 6
- }
-
- # Append to history
- with open(HISTORY_FILE, 'a') as f:
- f.write(json.dumps(today_data) + '\n')
-
- # Load all historical data
- df = pd.read_json(HISTORY_FILE, lines=True)
- df['date'] = pd.to_datetime(df['timestamp']).dt.date
- df = df.sort_values('timestamp')
-
- # Aggregate by date
- daily_stats = df.groupby('date').sum()
-
- # Generate trend chart
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- fig, axes = plt.subplots(2, 2, figsize=(16, 12), dpi=300)
- fig.suptitle('GitHub Activity Trends', fontsize=18, fontweight='bold')
-
- # Chart 1: Issues Opened
- axes[0, 0].plot(daily_stats.index, daily_stats['issues_opened'],
- marker='o', linewidth=2, color='#FF6B6B')
- axes[0, 0].set_title('Issues Opened', fontsize=14)
- axes[0, 0].grid(True, alpha=0.3)
-
- # Chart 2: PRs Merged
- axes[0, 1].plot(daily_stats.index, daily_stats['prs_merged'],
- marker='s', linewidth=2, color='#4ECDC4')
- axes[0, 1].set_title('PRs Merged', fontsize=14)
- axes[0, 1].grid(True, alpha=0.3)
-
- # Chart 3: Commits
- axes[1, 0].plot(daily_stats.index, daily_stats['commits'],
- marker='^', linewidth=2, color='#45B7D1')
- axes[1, 0].set_title('Commits', fontsize=14)
- axes[1, 0].grid(True, alpha=0.3)
-
- # Chart 4: Contributors
- axes[1, 1].plot(daily_stats.index, daily_stats['contributors'],
- marker='D', linewidth=2, color='#FFA07A')
- axes[1, 1].set_title('Active Contributors', fontsize=14)
- axes[1, 1].grid(True, alpha=0.3)
-
- plt.tight_layout()
- plt.savefig(f'{CHARTS_DIR}/activity_trends.png',
- dpi=300, bbox_inches='tight', facecolor='white')
-
- print(f"✅ Trend chart generated with {len(df)} data points")
- print(f"📊 Chart saved to: {CHARTS_DIR}/activity_trends.png")
- print(f"💾 Historical data: {HISTORY_FILE}")
- ```
-
- ## Integration with Asset Upload and Discussions
-
- After generating charts, use the safe-outputs tools to share them:
-
- ```markdown
- ## Example Discussion with Trending Charts
-
- Upload each chart using the `upload asset` tool, then create a discussion:
-
- **Title**: "📈 Weekly Trending Analysis - [Date]"
-
- **Content**:
- # 📈 Trending Analysis Report
-
- Generated on: {date}
-
- ## Activity Trends
-
- 
-
- Analysis shows:
- - Issues opened: Up 15% from last week
- - PR velocity: Stable at 12 PRs/day
- - Commit activity: Peak on Tuesdays and Wednesdays
- - Active contributors: Growing trend (+20% this month)
-
- ## Data Summary
-
- - **Total data points**: {count}
- - **Date range**: {start} to {end}
- - **Tracking period**: {days} days
-
- ---
-
- *Generated using Charts with Trending shared workflow*
- *Historical data stored in cache-memory for continuous tracking*
- ```
-
- ## Tips for Success
-
- 1. **Consistency**: Use same metric names across runs
- 2. **Timestamps**: Always include ISO 8601 timestamps
- 3. **Validation**: Check data quality before appending
- 4. **Backup**: Keep metadata for data recovery
- 5. **Documentation**: Comment your data schemas
- 6. **Testing**: Validate charts before uploading
- 7. **Cleanup**: Implement retention policies
- 8. **Indexing**: Maintain metric index for discovery
-
- ## Common Use Cases
-
- ### Repository Activity Trends
- ```python
- # Track: commits, PRs, issues, contributors
- # Frequency: Daily
- # Retention: 90 days
- ```
-
- ### Performance Metrics Trends
- ```python
- # Track: build time, test coverage, bundle size
- # Frequency: Per commit/PR
- # Retention: 180 days
- ```
-
- ### Quality Metrics Trends
- ```python
- # Track: code complexity, test failures, security alerts
- # Frequency: Weekly
- # Retention: 1 year
- ```
-
- ### Workflow Efficiency Trends
- ```python
- # Track: workflow duration, token usage, success rate
- # Frequency: Per run
- # Retention: 30 days
- ```
-
- ---
-
- Remember: The power of trending comes from consistent data collection over time. Use cache-memory to build a rich historical dataset that reveals insights and patterns!
-
- # Python Data Visualization Guide
-
- Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
-
- ## Installed Libraries
-
- - **NumPy**: Array processing and numerical operations
- - **Pandas**: Data manipulation and analysis
- - **Matplotlib**: Chart generation and plotting
- - **Seaborn**: Statistical data visualization
- - **SciPy**: Scientific computing utilities
-
- ## Directory Structure
-
- ```
- /tmp/gh-aw/python/
- ├── data/ # Store all data files here (CSV, JSON, etc.)
- ├── charts/ # Generated chart images (PNG)
- ├── artifacts/ # Additional output files
- └── *.py # Python scripts
- ```
-
- ## Data Separation Requirement
-
- **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
-
- ### ❌ PROHIBITED - Inline Data
- ```python
- # DO NOT do this
- data = [10, 20, 30, 40, 50]
- labels = ['A', 'B', 'C', 'D', 'E']
- ```
-
- ### ✅ REQUIRED - External Data Files
- ```python
- # Always load data from external files
- import pandas as pd
-
- # Load data from CSV
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Or from JSON
- data = pd.read_json('/tmp/gh-aw/python/data/data.json')
- ```
-
- ## Chart Generation Best Practices
-
- ### High-Quality Chart Settings
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style for better aesthetics
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Create figure with high DPI
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
-
- # Your plotting code here
- # ...
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ### Chart Quality Guidelines
-
- - **DPI**: Use 300 or higher for publication quality
- - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
- - **Labels**: Always include clear axis labels and titles
- - **Legend**: Add legends when plotting multiple series
- - **Grid**: Enable grid lines for easier reading
- - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
-
- ## Including Images in Reports
-
- When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
-
- ### Step 1: Generate and Upload Chart
- ```python
- # Generate your chart
- plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
- ```
-
- ### Step 2: Upload as Asset
- Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
-
- ### Step 3: Include in Markdown Report
- When creating your discussion or issue, include the image using markdown:
-
- ```markdown
- ## Visualization Results
-
- 
-
- The chart above shows...
- ```
-
- **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
-
- ## Cache Memory Integration
-
- The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
-
- **Helper Functions to Cache:**
- - Data loading utilities: `data_loader.py`
- - Chart styling functions: `chart_utils.py`
- - Common data transformations: `transforms.py`
-
- **Check Cache Before Creating:**
- ```bash
- # Check if helper exists in cache
- if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
- cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
- echo "Using cached data_loader.py"
- fi
- ```
-
- **Save to Cache for Future Runs:**
- ```bash
- # Save useful helpers to cache
- cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
- echo "Saved data_loader.py to cache for future runs"
- ```
-
- ## Complete Example Workflow
-
- ```python
- #!/usr/bin/env python3
- """
- Example data visualization script
- Generates a bar chart from external data
- """
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set style
- sns.set_style("whitegrid")
- sns.set_palette("husl")
-
- # Load data from external file (NEVER inline)
- data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
-
- # Process data
- summary = data.groupby('category')['value'].sum()
-
- # Create chart
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- summary.plot(kind='bar', ax=ax)
-
- # Customize
- ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
- ax.set_xlabel('Category', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.grid(True, alpha=0.3)
-
- # Save chart
- plt.savefig('/tmp/gh-aw/python/charts/chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white')
-
- print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
- ```
-
- ## Error Handling
-
- **Check File Existence:**
- ```python
- import os
-
- data_file = '/tmp/gh-aw/python/data/data.csv'
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- ```
-
- **Validate Data:**
- ```python
- # Check for required columns
- required_cols = ['category', 'value']
- missing = set(required_cols) - set(data.columns)
- if missing:
- raise ValueError(f"Missing columns: {missing}")
- ```
-
- ## Artifact Upload
-
- Charts and source files are automatically uploaded as artifacts:
-
- **Charts Artifact:**
- - Name: `data-charts`
- - Contents: PNG files from `/tmp/gh-aw/python/charts/`
- - Retention: 30 days
-
- **Source and Data Artifact:**
- - Name: `python-source-and-data`
- - Contents: Python scripts and data files
- - Retention: 30 days
-
- Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
-
- ## Tips for Success
-
- 1. **Always Separate Data**: Store data in files, never inline in code
- 2. **Use Cache Memory**: Store reusable helpers for faster execution
- 3. **High Quality Charts**: Use DPI 300+ and proper sizing
- 4. **Clear Documentation**: Add docstrings and comments
- 5. **Error Handling**: Validate data and check file existence
- 6. **Type Hints**: Use type annotations for better code quality
- 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
- 8. **Reproducibility**: Set random seeds when needed
-
- ## Common Data Sources
-
- Based on common use cases:
-
- **Repository Statistics:**
- ```python
- # Collect via GitHub API, save to data.csv
- # Then load and visualize
- data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
- ```
-
- **Workflow Metrics:**
- ```python
- # Collect via GitHub Actions API, save to data.json
- data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
- ```
-
- **Sample Data Generation:**
- ```python
- # Generate with NumPy, save to file first
- import numpy as np
- data = np.random.randn(100, 2)
- df = pd.DataFrame(data, columns=['x', 'y'])
- df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
-
- # Then load it back (demonstrating the pattern)
- data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
- ```
-
- # Trends Visualization Guide
-
- You are an expert at creating compelling trend visualizations that reveal insights from data over time.
-
- ## Trending Chart Best Practices
-
- When generating trending charts, focus on:
-
- ### 1. **Time Series Excellence**
- - Use line charts for continuous trends over time
- - Add trend lines or moving averages to highlight patterns
- - Include clear date/time labels on the x-axis
- - Show confidence intervals or error bands when relevant
-
- ### 2. **Comparative Trends**
- - Use multi-line charts to compare multiple trends
- - Apply distinct colors for each series with a clear legend
- - Consider using area charts for stacked trends
- - Highlight key inflection points or anomalies
-
- ### 3. **Visual Impact**
- - Use vibrant, contrasting colors to make trends stand out
- - Add annotations for significant events or milestones
- - Include grid lines for easier value reading
- - Use appropriate scale (linear vs. logarithmic)
-
- ### 4. **Contextual Information**
- - Show percentage changes or growth rates
- - Include baseline comparisons (year-over-year, month-over-month)
- - Add summary statistics (min, max, average, median)
- - Highlight recent trends vs. historical patterns
-
- ## Example Trend Chart Types
-
- ### Temporal Trends
- ```python
- # Line chart with multiple trends
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- for column in data.columns:
- ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
- ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
- ax.set_xlabel('Date', fontsize=12)
- ax.set_ylabel('Value', fontsize=12)
- ax.legend(loc='best')
- ax.grid(True, alpha=0.3)
- plt.xticks(rotation=45)
- ```
-
- ### Growth Rates
- ```python
- # Bar chart showing period-over-period growth
- fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
- growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
- ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
- ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
- ax.set_ylabel('Growth %', fontsize=12)
- ```
-
- ### Moving Averages
- ```python
- # Trend with moving average overlay
- fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
- ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
- ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
- ax.fill_between(dates, values, moving_avg, alpha=0.2)
- ```
-
- ## Data Preparation for Trends
-
- ### Time-Based Indexing
- ```python
- # Convert to datetime and set as index
- data['date'] = pd.to_datetime(data['date'])
- data.set_index('date', inplace=True)
- data = data.sort_index()
- ```
-
- ### Resampling and Aggregation
- ```python
- # Resample daily data to weekly
- weekly_data = data.resample('W').mean()
-
- # Calculate rolling statistics
- data['rolling_mean'] = data['value'].rolling(window=7).mean()
- data['rolling_std'] = data['value'].rolling(window=7).std()
- ```
-
- ### Growth Calculations
- ```python
- # Calculate percentage change
- data['pct_change'] = data['value'].pct_change() * 100
-
- # Calculate year-over-year growth
- data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
- ```
-
- ## Color Palettes for Trends
-
- Use these palettes for impactful trend visualizations:
-
- - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
- - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
- - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
- - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
-
- ## Annotation Best Practices
-
- ```python
- # Annotate key points
- max_idx = data['value'].idxmax()
- max_val = data['value'].max()
- ax.annotate(f'Peak: {max_val:.2f}',
- xy=(max_idx, max_val),
- xytext=(10, 20),
- textcoords='offset points',
- arrowprops=dict(arrowstyle='->', color='red'),
- fontsize=10,
- fontweight='bold')
- ```
-
- ## Styling for Awesome Charts
-
- ```python
- import matplotlib.pyplot as plt
- import seaborn as sns
-
- # Set professional style
- sns.set_style("whitegrid")
- sns.set_context("notebook", font_scale=1.2)
-
- # Custom color palette
- custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
- sns.set_palette(custom_colors)
-
- # Figure with optimal dimensions
- fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
-
- # ... your plotting code ...
-
- # Tight layout for clean appearance
- plt.tight_layout()
-
- # Save with high quality
- plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
- dpi=300,
- bbox_inches='tight',
- facecolor='white',
- edgecolor='none')
- ```
-
- ## Tips for Trending Charts
-
- 1. **Start with the story**: What trend are you trying to show?
- 2. **Choose the right timeframe**: Match granularity to the pattern
- 3. **Smooth noise**: Use moving averages for volatile data
- 4. **Show context**: Include historical baselines or benchmarks
- 5. **Highlight insights**: Use annotations to draw attention
- 6. **Test readability**: Ensure labels and legends are clear
- 7. **Optimize colors**: Use colorblind-friendly palettes
- 8. **Export high quality**: Always use DPI 300+ for presentations
-
- ## Common Trend Patterns to Visualize
-
- - **Seasonal patterns**: Monthly or quarterly cycles
- - **Long-term growth**: Exponential or linear trends
- - **Volatility changes**: Periods of stability vs. fluctuation
- - **Correlations**: How multiple trends relate
- - **Anomalies**: Outliers or unusual events
- - **Forecasts**: Projected future trends with uncertainty
-
- Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/python-data-charts.md}}
- PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ # Charts with Trending - Complete Guide
+
+ This shared workflow provides everything you need to create compelling trend visualizations with persistent data storage.
+
+ > [!TIP]
+ > **Quick Start Alternative**
+ >
+ > Looking for a simpler setup? Use `shared/trending-charts-simple.md` for:
+ > - No nested imports (standalone configuration)
+ > - No network restrictions (strict mode compatible)
+ > - Quick start examples for common trending patterns
+ > - Minimal configuration overhead
+ >
+ > The simplified version is perfect for basic trending needs while this comprehensive version offers advanced patterns and best practices.
+
+ ## Cache-Memory for Trending Data
+
+ You have access to persistent cache-memory at `/tmp/gh-aw/cache-memory/` that survives across workflow runs. Use it to store historical trending data.
+
+ ### Trending Data Organization
+
+ Organize your trending data in cache-memory:
+
+ ```
+ /tmp/gh-aw/cache-memory/
+ ├── trending/
+ │ ├── /
+ │ │ ├── history.jsonl # Time-series data (JSON Lines format)
+ │ │ ├── metadata.json # Data schema and descriptions
+ │ │ └── last_updated.txt # Timestamp of last update
+ │ └── index.json # Index of all tracked metrics
+ ```
+
+ ### Helper Functions for Trending Data
+
+ **Load Historical Data:**
+ ```bash
+ # Check if historical data exists
+ if [ -f /tmp/gh-aw/cache-memory/trending/issues/history.jsonl ]; then
+ echo "Loading historical issue trending data..."
+ cp /tmp/gh-aw/cache-memory/trending/issues/history.jsonl /tmp/gh-aw/python/data/
+ else
+ echo "No historical data found. Starting fresh."
+ mkdir -p /tmp/gh-aw/cache-memory/trending/issues
+ fi
+ ```
+
+ **Append New Data:**
+ ```python
+ import json
+ from datetime import datetime
+
+ # New data point
+ data_point = {
+ "timestamp": datetime.now().isoformat(),
+ "metric": "issue_count",
+ "value": 42,
+ "metadata": {"source": "github_api"}
+ }
+
+ # Append to history (JSON Lines format)
+ with open('/tmp/gh-aw/cache-memory/trending/issues/history.jsonl', 'a') as f:
+ f.write(json.dumps(data_point) + '\n')
+ ```
+
+ **Load All Historical Data for Analysis:**
+ ```python
+ import pandas as pd
+ import json
+
+ # Load all historical data
+ data_points = []
+ history_file = '/tmp/gh-aw/cache-memory/trending/issues/history.jsonl'
+
+ if os.path.exists(history_file):
+ with open(history_file, 'r') as f:
+ for line in f:
+ data_points.append(json.loads(line))
+
+ # Convert to DataFrame for analysis
+ df = pd.DataFrame(data_points)
+ df['timestamp'] = pd.to_datetime(df['timestamp'])
+ df = df.sort_values('timestamp')
+ else:
+ df = pd.DataFrame() # Empty if no history
+ ```
+
+ ## Trending Analysis Patterns
+
+ ### Pattern 1: Daily Metrics Tracking
+
+ Track daily metrics and visualize trends over time:
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Daily metrics trending example
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+ import json
+ import os
+ from datetime import datetime
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load historical data
+ history_file = '/tmp/gh-aw/cache-memory/trending/daily_metrics/history.jsonl'
+ if os.path.exists(history_file):
+ data = pd.read_json(history_file, lines=True)
+ data['date'] = pd.to_datetime(data['timestamp']).dt.date
+ else:
+ data = pd.DataFrame()
+
+ # Add today's data
+ today_data = {
+ "timestamp": datetime.now().isoformat(),
+ "issues_opened": 5,
+ "issues_closed": 3,
+ "prs_merged": 2
+ }
+
+ # Append to history
+ os.makedirs(os.path.dirname(history_file), exist_ok=True)
+ with open(history_file, 'a') as f:
+ f.write(json.dumps(today_data) + '\n')
+
+ # Reload with today's data
+ data = pd.read_json(history_file, lines=True)
+ data['date'] = pd.to_datetime(data['timestamp']).dt.date
+ daily_stats = data.groupby('date').sum()
+
+ # Create trend chart
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ daily_stats.plot(ax=ax, marker='o', linewidth=2)
+ ax.set_title('Daily Metrics Trends', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Count', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ plt.tight_layout()
+
+ plt.savefig('/tmp/gh-aw/python/charts/daily_metrics_trend.png',
+ dpi=300, bbox_inches='tight', facecolor='white')
+
+ print(f"Chart saved. Total data points: {len(data)}")
+ ```
+
+ ### Pattern 2: Moving Averages and Smoothing
+
+ ```python
+ # Calculate 7-day moving average
+ df['rolling_avg'] = df['value'].rolling(window=7, min_periods=1).mean()
+
+ # Plot with trend line
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(df['date'], df['value'], label='Actual', alpha=0.5, marker='o')
+ ax.plot(df['date'], df['rolling_avg'], label='7-day Average', linewidth=2.5)
+ ax.fill_between(df['date'], df['value'], df['rolling_avg'], alpha=0.2)
+ ```
+
+ ### Pattern 3: Comparative Trends
+
+ ```python
+ # Compare multiple metrics over time
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ for metric in ['metric_a', 'metric_b', 'metric_c']:
+ metric_data = df[df['metric'] == metric]
+ ax.plot(metric_data['timestamp'], metric_data['value'],
+ marker='o', label=metric, linewidth=2)
+
+ ax.set_title('Comparative Metrics Trends', fontsize=16, fontweight='bold')
+ ax.legend(loc='best', fontsize=12)
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ## Best Practices for Cache-Memory Trending
+
+ ### 1. Use JSON Lines Format
+
+ JSON Lines (`.jsonl`) is ideal for append-only trending data:
+ - One JSON object per line
+ - Easy to append new data
+ - Efficient for time-series data
+ - Simple to load with pandas: `pd.read_json(file, lines=True)`
+
+ ### 2. Include Metadata
+
+ Store metadata alongside data:
+ ```json
+ {
+ "metric_name": "issue_resolution_time",
+ "unit": "hours",
+ "description": "Average time to close issues",
+ "started_tracking": "2024-01-01",
+ "updated": "2024-03-15"
+ }
+ ```
+
+ ### 3. Maintain Index
+
+ Keep an index of all tracked metrics:
+ ```json
+ {
+ "metrics": [
+ "issue_count",
+ "pr_count",
+ "commit_count",
+ "test_coverage"
+ ],
+ "last_updated": "2024-03-15T10:30:00Z"
+ }
+ ```
+
+ ### 4. Data Retention Strategy
+
+ Implement retention policies to prevent unbounded growth:
+ ```python
+ # Keep only last 90 days
+ cutoff_date = datetime.now() - timedelta(days=90)
+ df = df[df['timestamp'] >= cutoff_date]
+
+ # Save pruned data
+ df.to_json('/tmp/gh-aw/cache-memory/trending/history.jsonl',
+ orient='records', lines=True)
+ ```
+
+ ## Complete Trending Workflow Example
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Complete trending analysis workflow
+ Collects data, updates history, generates trend charts
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+ import json
+ import os
+ from datetime import datetime, timedelta
+
+ # Configuration
+ CACHE_DIR = '/tmp/gh-aw/cache-memory/trending'
+ METRIC_NAME = 'github_activity'
+ HISTORY_FILE = f'{CACHE_DIR}/{METRIC_NAME}/history.jsonl'
+ CHARTS_DIR = '/tmp/gh-aw/python/charts'
+
+ # Ensure directories exist
+ os.makedirs(f'{CACHE_DIR}/{METRIC_NAME}', exist_ok=True)
+ os.makedirs(CHARTS_DIR, exist_ok=True)
+
+ # Collect today's data (example)
+ today_data = {
+ "timestamp": datetime.now().isoformat(),
+ "issues_opened": 8,
+ "prs_merged": 12,
+ "commits": 45,
+ "contributors": 6
+ }
+
+ # Append to history
+ with open(HISTORY_FILE, 'a') as f:
+ f.write(json.dumps(today_data) + '\n')
+
+ # Load all historical data
+ df = pd.read_json(HISTORY_FILE, lines=True)
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
+ df = df.sort_values('timestamp')
+
+ # Aggregate by date
+ daily_stats = df.groupby('date').sum()
+
+ # Generate trend chart
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ fig, axes = plt.subplots(2, 2, figsize=(16, 12), dpi=300)
+ fig.suptitle('GitHub Activity Trends', fontsize=18, fontweight='bold')
+
+ # Chart 1: Issues Opened
+ axes[0, 0].plot(daily_stats.index, daily_stats['issues_opened'],
+ marker='o', linewidth=2, color='#FF6B6B')
+ axes[0, 0].set_title('Issues Opened', fontsize=14)
+ axes[0, 0].grid(True, alpha=0.3)
+
+ # Chart 2: PRs Merged
+ axes[0, 1].plot(daily_stats.index, daily_stats['prs_merged'],
+ marker='s', linewidth=2, color='#4ECDC4')
+ axes[0, 1].set_title('PRs Merged', fontsize=14)
+ axes[0, 1].grid(True, alpha=0.3)
+
+ # Chart 3: Commits
+ axes[1, 0].plot(daily_stats.index, daily_stats['commits'],
+ marker='^', linewidth=2, color='#45B7D1')
+ axes[1, 0].set_title('Commits', fontsize=14)
+ axes[1, 0].grid(True, alpha=0.3)
+
+ # Chart 4: Contributors
+ axes[1, 1].plot(daily_stats.index, daily_stats['contributors'],
+ marker='D', linewidth=2, color='#FFA07A')
+ axes[1, 1].set_title('Active Contributors', fontsize=14)
+ axes[1, 1].grid(True, alpha=0.3)
+
+ plt.tight_layout()
+ plt.savefig(f'{CHARTS_DIR}/activity_trends.png',
+ dpi=300, bbox_inches='tight', facecolor='white')
+
+ print(f"✅ Trend chart generated with {len(df)} data points")
+ print(f"📊 Chart saved to: {CHARTS_DIR}/activity_trends.png")
+ print(f"💾 Historical data: {HISTORY_FILE}")
+ ```
+
+ ## Integration with Asset Upload and Discussions
+
+ After generating charts, use the safe-outputs tools to share them:
+
+ ```markdown
+ ## Example Discussion with Trending Charts
+
+ Upload each chart using the `upload asset` tool, then create a discussion:
+
+ **Title**: "📈 Weekly Trending Analysis - [Date]"
+
+ **Content**:
+ # 📈 Trending Analysis Report
+
+ Generated on: {date}
+
+ ## Activity Trends
+
+ 
+
+ Analysis shows:
+ - Issues opened: Up 15% from last week
+ - PR velocity: Stable at 12 PRs/day
+ - Commit activity: Peak on Tuesdays and Wednesdays
+ - Active contributors: Growing trend (+20% this month)
+
+ ## Data Summary
+
+ - **Total data points**: {count}
+ - **Date range**: {start} to {end}
+ - **Tracking period**: {days} days
+
+ ---
+
+ *Generated using Charts with Trending shared workflow*
+ *Historical data stored in cache-memory for continuous tracking*
+ ```
+
+ ## Tips for Success
+
+ 1. **Consistency**: Use same metric names across runs
+ 2. **Timestamps**: Always include ISO 8601 timestamps
+ 3. **Validation**: Check data quality before appending
+ 4. **Backup**: Keep metadata for data recovery
+ 5. **Documentation**: Comment your data schemas
+ 6. **Testing**: Validate charts before uploading
+ 7. **Cleanup**: Implement retention policies
+ 8. **Indexing**: Maintain metric index for discovery
+
+ ## Common Use Cases
+
+ ### Repository Activity Trends
+ ```python
+ # Track: commits, PRs, issues, contributors
+ # Frequency: Daily
+ # Retention: 90 days
+ ```
+
+ ### Performance Metrics Trends
+ ```python
+ # Track: build time, test coverage, bundle size
+ # Frequency: Per commit/PR
+ # Retention: 180 days
+ ```
+
+ ### Quality Metrics Trends
+ ```python
+ # Track: code complexity, test failures, security alerts
+ # Frequency: Weekly
+ # Retention: 1 year
+ ```
+
+ ### Workflow Efficiency Trends
+ ```python
+ # Track: workflow duration, token usage, success rate
+ # Frequency: Per run
+ # Retention: 30 days
+ ```
+
+ ---
+
+ Remember: The power of trending comes from consistent data collection over time. Use cache-memory to build a rich historical dataset that reveals insights and patterns!
+
+ # Python Data Visualization Guide
+
+ Python scientific libraries have been installed and are ready for use. A temporary folder structure has been created at `/tmp/gh-aw/python/` for organizing scripts, data, and outputs.
+
+ ## Installed Libraries
+
+ - **NumPy**: Array processing and numerical operations
+ - **Pandas**: Data manipulation and analysis
+ - **Matplotlib**: Chart generation and plotting
+ - **Seaborn**: Statistical data visualization
+ - **SciPy**: Scientific computing utilities
+
+ ## Directory Structure
+
+ ```
+ /tmp/gh-aw/python/
+ ├── data/ # Store all data files here (CSV, JSON, etc.)
+ ├── charts/ # Generated chart images (PNG)
+ ├── artifacts/ # Additional output files
+ └── *.py # Python scripts
+ ```
+
+ ## Data Separation Requirement
+
+ **CRITICAL**: Data must NEVER be inlined in Python code. Always store data in external files and load using pandas.
+
+ ### ❌ PROHIBITED - Inline Data
+ ```python
+ # DO NOT do this
+ data = [10, 20, 30, 40, 50]
+ labels = ['A', 'B', 'C', 'D', 'E']
+ ```
+
+ ### ✅ REQUIRED - External Data Files
+ ```python
+ # Always load data from external files
+ import pandas as pd
+
+ # Load data from CSV
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Or from JSON
+ data = pd.read_json('/tmp/gh-aw/python/data/data.json')
+ ```
+
+ ## Chart Generation Best Practices
+
+ ### High-Quality Chart Settings
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style for better aesthetics
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Create figure with high DPI
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+
+ # Your plotting code here
+ # ...
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ### Chart Quality Guidelines
+
+ - **DPI**: Use 300 or higher for publication quality
+ - **Figure Size**: Standard is 10x6 inches (adjustable based on needs)
+ - **Labels**: Always include clear axis labels and titles
+ - **Legend**: Add legends when plotting multiple series
+ - **Grid**: Enable grid lines for easier reading
+ - **Colors**: Use colorblind-friendly palettes (seaborn defaults are good)
+
+ ## Including Images in Reports
+
+ When creating reports (issues, discussions, etc.), use the `upload asset` tool to make images URL-addressable and include them in markdown:
+
+ ### Step 1: Generate and Upload Chart
+ ```python
+ # Generate your chart
+ plt.savefig('/tmp/gh-aw/python/charts/my_chart.png', dpi=300, bbox_inches='tight')
+ ```
+
+ ### Step 2: Upload as Asset
+ Use the `upload asset` tool to upload the chart file. The tool will return a GitHub raw content URL.
+
+ ### Step 3: Include in Markdown Report
+ When creating your discussion or issue, include the image using markdown:
+
+ ```markdown
+ ## Visualization Results
+
+ 
+
+ The chart above shows...
+ ```
+
+ **Important**: Assets are published to an orphaned git branch and become URL-addressable after workflow completion.
+
+ ## Cache Memory Integration
+
+ The cache memory at `/tmp/gh-aw/cache-memory/` is available for storing reusable code:
+
+ **Helper Functions to Cache:**
+ - Data loading utilities: `data_loader.py`
+ - Chart styling functions: `chart_utils.py`
+ - Common data transformations: `transforms.py`
+
+ **Check Cache Before Creating:**
+ ```bash
+ # Check if helper exists in cache
+ if [ -f /tmp/gh-aw/cache-memory/data_loader.py ]; then
+ cp /tmp/gh-aw/cache-memory/data_loader.py /tmp/gh-aw/python/
+ echo "Using cached data_loader.py"
+ fi
+ ```
+
+ **Save to Cache for Future Runs:**
+ ```bash
+ # Save useful helpers to cache
+ cp /tmp/gh-aw/python/data_loader.py /tmp/gh-aw/cache-memory/
+ echo "Saved data_loader.py to cache for future runs"
+ ```
+
+ ## Complete Example Workflow
+
+ ```python
+ #!/usr/bin/env python3
+ """
+ Example data visualization script
+ Generates a bar chart from external data
+ """
+ import pandas as pd
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set style
+ sns.set_style("whitegrid")
+ sns.set_palette("husl")
+
+ # Load data from external file (NEVER inline)
+ data = pd.read_csv('/tmp/gh-aw/python/data/data.csv')
+
+ # Process data
+ summary = data.groupby('category')['value'].sum()
+
+ # Create chart
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ summary.plot(kind='bar', ax=ax)
+
+ # Customize
+ ax.set_title('Data Summary by Category', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Category', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.grid(True, alpha=0.3)
+
+ # Save chart
+ plt.savefig('/tmp/gh-aw/python/charts/chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white')
+
+ print("Chart saved to /tmp/gh-aw/python/charts/chart.png")
+ ```
+
+ ## Error Handling
+
+ **Check File Existence:**
+ ```python
+ import os
+
+ data_file = '/tmp/gh-aw/python/data/data.csv'
+ if not os.path.exists(data_file):
+ raise FileNotFoundError(f"Data file not found: {data_file}")
+ ```
+
+ **Validate Data:**
+ ```python
+ # Check for required columns
+ required_cols = ['category', 'value']
+ missing = set(required_cols) - set(data.columns)
+ if missing:
+ raise ValueError(f"Missing columns: {missing}")
+ ```
+
+ ## Artifact Upload
+
+ Charts and source files are automatically uploaded as artifacts:
+
+ **Charts Artifact:**
+ - Name: `data-charts`
+ - Contents: PNG files from `/tmp/gh-aw/python/charts/`
+ - Retention: 30 days
+
+ **Source and Data Artifact:**
+ - Name: `python-source-and-data`
+ - Contents: Python scripts and data files
+ - Retention: 30 days
+
+ Both artifacts are uploaded with `if: always()` condition, ensuring they're available even if the workflow fails.
+
+ ## Tips for Success
+
+ 1. **Always Separate Data**: Store data in files, never inline in code
+ 2. **Use Cache Memory**: Store reusable helpers for faster execution
+ 3. **High Quality Charts**: Use DPI 300+ and proper sizing
+ 4. **Clear Documentation**: Add docstrings and comments
+ 5. **Error Handling**: Validate data and check file existence
+ 6. **Type Hints**: Use type annotations for better code quality
+ 7. **Seaborn Defaults**: Leverage seaborn for better aesthetics
+ 8. **Reproducibility**: Set random seeds when needed
+
+ ## Common Data Sources
+
+ Based on common use cases:
+
+ **Repository Statistics:**
+ ```python
+ # Collect via GitHub API, save to data.csv
+ # Then load and visualize
+ data = pd.read_csv('/tmp/gh-aw/python/data/repo_stats.csv')
+ ```
+
+ **Workflow Metrics:**
+ ```python
+ # Collect via GitHub Actions API, save to data.json
+ data = pd.read_json('/tmp/gh-aw/python/data/workflow_metrics.json')
+ ```
+
+ **Sample Data Generation:**
+ ```python
+ # Generate with NumPy, save to file first
+ import numpy as np
+ data = np.random.randn(100, 2)
+ df = pd.DataFrame(data, columns=['x', 'y'])
+ df.to_csv('/tmp/gh-aw/python/data/sample_data.csv', index=False)
+
+ # Then load it back (demonstrating the pattern)
+ data = pd.read_csv('/tmp/gh-aw/python/data/sample_data.csv')
+ ```
+
+ # Trends Visualization Guide
+
+ You are an expert at creating compelling trend visualizations that reveal insights from data over time.
+
+ ## Trending Chart Best Practices
+
+ When generating trending charts, focus on:
+
+ ### 1. **Time Series Excellence**
+ - Use line charts for continuous trends over time
+ - Add trend lines or moving averages to highlight patterns
+ - Include clear date/time labels on the x-axis
+ - Show confidence intervals or error bands when relevant
+
+ ### 2. **Comparative Trends**
+ - Use multi-line charts to compare multiple trends
+ - Apply distinct colors for each series with a clear legend
+ - Consider using area charts for stacked trends
+ - Highlight key inflection points or anomalies
+
+ ### 3. **Visual Impact**
+ - Use vibrant, contrasting colors to make trends stand out
+ - Add annotations for significant events or milestones
+ - Include grid lines for easier value reading
+ - Use appropriate scale (linear vs. logarithmic)
+
+ ### 4. **Contextual Information**
+ - Show percentage changes or growth rates
+ - Include baseline comparisons (year-over-year, month-over-month)
+ - Add summary statistics (min, max, average, median)
+ - Highlight recent trends vs. historical patterns
+
+ ## Example Trend Chart Types
+
+ ### Temporal Trends
+ ```python
+ # Line chart with multiple trends
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ for column in data.columns:
+ ax.plot(data.index, data[column], marker='o', label=column, linewidth=2)
+ ax.set_title('Trends Over Time', fontsize=16, fontweight='bold')
+ ax.set_xlabel('Date', fontsize=12)
+ ax.set_ylabel('Value', fontsize=12)
+ ax.legend(loc='best')
+ ax.grid(True, alpha=0.3)
+ plt.xticks(rotation=45)
+ ```
+
+ ### Growth Rates
+ ```python
+ # Bar chart showing period-over-period growth
+ fig, ax = plt.subplots(figsize=(10, 6), dpi=300)
+ growth_data.plot(kind='bar', ax=ax, color=sns.color_palette("husl"))
+ ax.set_title('Growth Rates by Period', fontsize=16, fontweight='bold')
+ ax.axhline(y=0, color='black', linestyle='-', linewidth=0.8)
+ ax.set_ylabel('Growth %', fontsize=12)
+ ```
+
+ ### Moving Averages
+ ```python
+ # Trend with moving average overlay
+ fig, ax = plt.subplots(figsize=(12, 7), dpi=300)
+ ax.plot(dates, values, label='Actual', alpha=0.5, linewidth=1)
+ ax.plot(dates, moving_avg, label='7-day Moving Average', linewidth=2.5)
+ ax.fill_between(dates, values, moving_avg, alpha=0.2)
+ ```
+
+ ## Data Preparation for Trends
+
+ ### Time-Based Indexing
+ ```python
+ # Convert to datetime and set as index
+ data['date'] = pd.to_datetime(data['date'])
+ data.set_index('date', inplace=True)
+ data = data.sort_index()
+ ```
+
+ ### Resampling and Aggregation
+ ```python
+ # Resample daily data to weekly
+ weekly_data = data.resample('W').mean()
+
+ # Calculate rolling statistics
+ data['rolling_mean'] = data['value'].rolling(window=7).mean()
+ data['rolling_std'] = data['value'].rolling(window=7).std()
+ ```
+
+ ### Growth Calculations
+ ```python
+ # Calculate percentage change
+ data['pct_change'] = data['value'].pct_change() * 100
+
+ # Calculate year-over-year growth
+ data['yoy_growth'] = data['value'].pct_change(periods=365) * 100
+ ```
+
+ ## Color Palettes for Trends
+
+ Use these palettes for impactful trend visualizations:
+
+ - **Sequential trends**: `sns.color_palette("viridis", n_colors=5)`
+ - **Diverging trends**: `sns.color_palette("RdYlGn", n_colors=7)`
+ - **Multiple series**: `sns.color_palette("husl", n_colors=8)`
+ - **Categorical**: `sns.color_palette("Set2", n_colors=6)`
+
+ ## Annotation Best Practices
+
+ ```python
+ # Annotate key points
+ max_idx = data['value'].idxmax()
+ max_val = data['value'].max()
+ ax.annotate(f'Peak: {max_val:.2f}',
+ xy=(max_idx, max_val),
+ xytext=(10, 20),
+ textcoords='offset points',
+ arrowprops=dict(arrowstyle='->', color='red'),
+ fontsize=10,
+ fontweight='bold')
+ ```
+
+ ## Styling for Awesome Charts
+
+ ```python
+ import matplotlib.pyplot as plt
+ import seaborn as sns
+
+ # Set professional style
+ sns.set_style("whitegrid")
+ sns.set_context("notebook", font_scale=1.2)
+
+ # Custom color palette
+ custom_colors = ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8"]
+ sns.set_palette(custom_colors)
+
+ # Figure with optimal dimensions
+ fig, ax = plt.subplots(figsize=(14, 8), dpi=300)
+
+ # ... your plotting code ...
+
+ # Tight layout for clean appearance
+ plt.tight_layout()
+
+ # Save with high quality
+ plt.savefig('/tmp/gh-aw/python/charts/trend_chart.png',
+ dpi=300,
+ bbox_inches='tight',
+ facecolor='white',
+ edgecolor='none')
+ ```
+
+ ## Tips for Trending Charts
+
+ 1. **Start with the story**: What trend are you trying to show?
+ 2. **Choose the right timeframe**: Match granularity to the pattern
+ 3. **Smooth noise**: Use moving averages for volatile data
+ 4. **Show context**: Include historical baselines or benchmarks
+ 5. **Highlight insights**: Use annotations to draw attention
+ 6. **Test readability**: Ensure labels and legends are clear
+ 7. **Optimize colors**: Use colorblind-friendly palettes
+ 8. **Export high quality**: Always use DPI 300+ for presentations
+
+ ## Common Trend Patterns to Visualize
+
+ - **Seasonal patterns**: Monthly or quarterly cycles
+ - **Long-term growth**: Exponential or linear trends
+ - **Volatility changes**: Periods of stability vs. fluctuation
+ - **Correlations**: How multiple trends relate
+ - **Anomalies**: Outliers or unusual events
+ - **Forecasts**: Projected future trends with uncertainty
+
+ Remember: The best trending charts tell a clear story, make patterns obvious, and inspire action based on the insights revealed.
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/python-data-charts.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml
index 55a9af4ea9..09884abdb2 100644
--- a/.github/workflows/q.lock.yml
+++ b/.github/workflows/q.lock.yml
@@ -628,71 +628,73 @@ jobs:
GH_AW_IS_PR_COMMENT: ${{ github.event.issue.pull_request && 'true' || '' }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/cache_memory_prompt.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
- cat "/opt/gh-aw/prompts/pr_context_prompt.md" >> "$GH_AW_PROMPT"
- fi
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/q.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat "/opt/gh-aw/prompts/cache_memory_prompt.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ if [ "$GITHUB_EVENT_NAME" = "issue_comment" ] && [ -n "$GH_AW_IS_PR_COMMENT" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review_comment" ] || [ "$GITHUB_EVENT_NAME" = "pull_request_review" ]; then
+ cat "/opt/gh-aw/prompts/pr_context_prompt.md"
+ fi
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/q.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml
index d2eab81c58..53409f6703 100644
--- a/.github/workflows/release.lock.yml
+++ b/.github/workflows/release.lock.yml
@@ -500,62 +500,64 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/release.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/release.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/repo-audit-analyzer.lock.yml b/.github/workflows/repo-audit-analyzer.lock.yml
index f6b9570be7..9932617b0e 100644
--- a/.github/workflows/repo-audit-analyzer.lock.yml
+++ b/.github/workflows/repo-audit-analyzer.lock.yml
@@ -497,156 +497,158 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Cache Folders Available
-
- You have access to persistent cache folders where you can read and write files to create memories and store information:
-
- - **repo-audits**: `/tmp/gh-aw/cache-memory-repo-audits/`
-
- - **Read/Write Access**: You can freely read from and write to any files in these folders
- - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
- - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
- - **File Share**: Use these as simple file shares - organize files as you see fit
-
- Examples of what you can store:
- - `/tmp/gh-aw/cache-memory-repo-audits/notes.txt` - general notes and observations
- - `/tmp/gh-aw/cache-memory-repo-audits/preferences.json` - user preferences and settings
- - `/tmp/gh-aw/cache-memory-repo-audits/state/` - organized state files in subdirectories
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/repo-audit-analyzer.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Cache Folders Available
+
+ You have access to persistent cache folders where you can read and write files to create memories and store information:
+
+ - **repo-audits**: `/tmp/gh-aw/cache-memory-repo-audits/`
+
+ - **Read/Write Access**: You can freely read from and write to any files in these folders
+ - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
+ - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
+ - **File Share**: Use these as simple file shares - organize files as you see fit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/cache-memory-repo-audits/notes.txt` - general notes and observations
+ - `/tmp/gh-aw/cache-memory-repo-audits/preferences.json` - user preferences and settings
+ - `/tmp/gh-aw/cache-memory-repo-audits/state/` - organized state files in subdirectories
+
+ Feel free to create, read, update, and organize files in these folders as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/repo-audit-analyzer.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml
index 733386e081..7cf8cc4e8a 100644
--- a/.github/workflows/repo-tree-map.lock.yml
+++ b/.github/workflows/repo-tree-map.lock.yml
@@ -480,135 +480,137 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/repo-tree-map.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/repo-tree-map.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml
index fe08a35d86..8334981e96 100644
--- a/.github/workflows/repository-quality-improver.lock.yml
+++ b/.github/workflows/repository-quality-improver.lock.yml
@@ -501,156 +501,158 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- ---
-
- ## Cache Folders Available
-
- You have access to persistent cache folders where you can read and write files to create memories and store information:
-
- - **focus-areas**: `/tmp/gh-aw/cache-memory-focus-areas/`
-
- - **Read/Write Access**: You can freely read from and write to any files in these folders
- - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
- - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
- - **File Share**: Use these as simple file shares - organize files as you see fit
-
- Examples of what you can store:
- - `/tmp/gh-aw/cache-memory-focus-areas/notes.txt` - general notes and observations
- - `/tmp/gh-aw/cache-memory-focus-areas/preferences.json` - user preferences and settings
- - `/tmp/gh-aw/cache-memory-focus-areas/state/` - organized state files in subdirectories
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks.
-
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
- View Detailed Results
-
- [Comprehensive details, logs, traces]
-
-
-
-
- View All Warnings
-
- [Minor issues and potential problems]
-
-
-
- ### Recommendations
- [Actionable next steps - keep visible]
- ```
-
- ## Workflow Run References
-
- - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- - Include up to 3 most relevant run URLs at end under `**References:**`
- - Do NOT add footer attribution (system adds automatically)
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
- {{#runtime-import workflows/repository-quality-improver.md}}
- PROMPT_EOF
+ {
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat "/opt/gh-aw/prompts/temp_folder_prompt.md"
+ cat "/opt/gh-aw/prompts/markdown.md"
+ cat << 'PROMPT_EOF'
+
+ ---
+
+ ## Cache Folders Available
+
+ You have access to persistent cache folders where you can read and write files to create memories and store information:
+
+ - **focus-areas**: `/tmp/gh-aw/cache-memory-focus-areas/`
+
+ - **Read/Write Access**: You can freely read from and write to any files in these folders
+ - **Persistence**: Files in these folders persist across workflow runs via GitHub Actions cache
+ - **Last Write Wins**: If multiple processes write to the same file, the last write will be preserved
+ - **File Share**: Use these as simple file shares - organize files as you see fit
+
+ Examples of what you can store:
+ - `/tmp/gh-aw/cache-memory-focus-areas/notes.txt` - general notes and observations
+ - `/tmp/gh-aw/cache-memory-focus-areas/preferences.json` - user preferences and settings
+ - `/tmp/gh-aw/cache-memory-focus-areas/state/` - organized state files in subdirectories
+
+ Feel free to create, read, update, and organize files in these folders as needed for your tasks.
+
+
+ GitHub API Access Instructions
+
+ The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
+
+
+ To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
+
+ Discover available tools from the safeoutputs MCP server.
+
+ **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
+
+ **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
+
+
+
+ The following GitHub context information is available for this workflow:
+ {{#if __GH_AW_GITHUB_ACTOR__ }}
+ - **actor**: __GH_AW_GITHUB_ACTOR__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_REPOSITORY__ }}
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_WORKSPACE__ }}
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
+ - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
+ - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
+ - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
+ - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
+ {{/if}}
+ {{#if __GH_AW_GITHUB_RUN_ID__ }}
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
+ {{/if}}
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ ## Report Structure Guidelines
+
+ ### 1. Header Levels
+ **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
+
+ When creating GitHub issues or discussions:
+ - Use `###` (h3) for main sections (e.g., "### Test Summary")
+ - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
+ - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
+
+ ### 2. Progressive Disclosure
+ **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
+
+ Use collapsible sections for:
+ - Verbose details (full test logs, raw data)
+ - Secondary information (minor warnings, extra context)
+ - Per-item breakdowns when there are many items
+
+ Always keep critical information visible (summary, critical issues, key metrics).
+
+ ### 3. Report Structure Pattern
+
+ 1. **Overview**: 1-2 paragraphs summarizing key findings
+ 2. **Critical Information**: Show immediately (summary stats, critical issues)
+ 3. **Details**: Use `Section Name
` for expanded content
+ 4. **Context**: Add helpful metadata (workflow run, date, trigger)
+
+ ### Design Principles (Airbnb-Inspired)
+
+ Reports should:
+ - **Build trust through clarity**: Most important info immediately visible
+ - **Exceed expectations**: Add helpful context like trends, comparisons
+ - **Create delight**: Use progressive disclosure to reduce overwhelm
+ - **Maintain consistency**: Follow patterns across all reports
+
+ ### Example Report Structure
+
+ ```markdown
+ ### Summary
+ - Key metric 1: value
+ - Key metric 2: value
+ - Status: ✅/⚠️/❌
+
+ ### Critical Issues
+ [Always visible - these are important]
+
+
+ View Detailed Results
+
+ [Comprehensive details, logs, traces]
+
+
+
+
+ View All Warnings
+
+ [Minor issues and potential problems]
+
+
+
+ ### Recommendations
+ [Actionable next steps - keep visible]
+ ```
+
+ ## Workflow Run References
+
+ - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
+ - Include up to 3 most relevant run URLs at end under `**References:**`
+ - Do NOT add footer attribution (system adds automatically)
+
+
+ PROMPT_EOF
+ cat << 'PROMPT_EOF'
+ {{#runtime-import workflows/repository-quality-improver.md}}
+ PROMPT_EOF
+ } > "$GH_AW_PROMPT"
- name: Substitute placeholders
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml
index 96a78f6f6e..2e94a0d0a5 100644
--- a/.github/workflows/research.lock.yml
+++ b/.github/workflows/research.lock.yml
@@ -497,137 +497,139 @@ jobs:
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
run: |
bash /opt/gh-aw/actions/create_prompt_first.sh
- cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
- cat "/opt/gh-aw/prompts/markdown.md" >> "$GH_AW_PROMPT"
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- GitHub API Access Instructions
-
- The gh CLI is NOT authenticated. Do NOT use gh commands for GitHub operations.
-
-
- To create or modify GitHub resources (issues, discussions, pull requests, etc.), you MUST call the appropriate safe output tool. Simply writing content will NOT work - the workflow requires actual tool calls.
-
- Discover available tools from the safeoutputs MCP server.
-
- **Critical**: Tool calls write structured data that downstream jobs process. Without tool calls, follow-up actions will be skipped.
-
- **Note**: If you made no other safe output tool calls during this workflow execution, call the "noop" tool to provide a status message indicating completion or that no actions were needed.
-
-
-
- The following GitHub context information is available for this workflow:
- {{#if __GH_AW_GITHUB_ACTOR__ }}
- - **actor**: __GH_AW_GITHUB_ACTOR__
- {{/if}}
- {{#if __GH_AW_GITHUB_REPOSITORY__ }}
- - **repository**: __GH_AW_GITHUB_REPOSITORY__
- {{/if}}
- {{#if __GH_AW_GITHUB_WORKSPACE__ }}
- - **workspace**: __GH_AW_GITHUB_WORKSPACE__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}
- - **issue-number**: #__GH_AW_GITHUB_EVENT_ISSUE_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__ }}
- - **discussion-number**: #__GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__ }}
- - **pull-request-number**: #__GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER__
- {{/if}}
- {{#if __GH_AW_GITHUB_EVENT_COMMENT_ID__ }}
- - **comment-id**: __GH_AW_GITHUB_EVENT_COMMENT_ID__
- {{/if}}
- {{#if __GH_AW_GITHUB_RUN_ID__ }}
- - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
- {{/if}}
-
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
- PROMPT_EOF
- cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
-
-
- ## Report Structure Guidelines
-
- ### 1. Header Levels
- **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
-
- When creating GitHub issues or discussions:
- - Use `###` (h3) for main sections (e.g., "### Test Summary")
- - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
-
- ### 2. Progressive Disclosure
- **Wrap detailed test results in `Section Name
` tags to improve readability and reduce scrolling.**
-
- Use collapsible sections for:
- - Verbose details (full test logs, raw data)
- - Secondary information (minor warnings, extra context)
- - Per-item breakdowns when there are many items
-
- Always keep critical information visible (summary, critical issues, key metrics).
-
- ### 3. Report Structure Pattern
-
- 1. **Overview**: 1-2 paragraphs summarizing key findings
- 2. **Critical Information**: Show immediately (summary stats, critical issues)
- 3. **Details**: Use `Section Name
` for expanded content
- 4. **Context**: Add helpful metadata (workflow run, date, trigger)
-
- ### Design Principles (Airbnb-Inspired)
-
- Reports should:
- - **Build trust through clarity**: Most important info immediately visible
- - **Exceed expectations**: Add helpful context like trends, comparisons
- - **Create delight**: Use progressive disclosure to reduce overwhelm
- - **Maintain consistency**: Follow patterns across all reports
-
- ### Example Report Structure
-
- ```markdown
- ### Summary
- - Key metric 1: value
- - Key metric 2: value
- - Status: ✅/⚠️/❌
-
- ### Critical Issues
- [Always visible - these are important]
-
-
-