diff --git a/.github/workflows/agentics-maintenance.yml b/.github/workflows/agentics-maintenance.yml index 2b9a56ae4..33c4ba555 100644 --- a/.github/workflows/agentics-maintenance.yml +++ b/.github/workflows/agentics-maintenance.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.37.22). DO NOT EDIT. +# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.37.23). DO NOT EDIT. # # To regenerate this workflow, run: # gh aw compile @@ -46,7 +46,7 @@ jobs: issues: write steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions diff --git a/.github/workflows/api-coherence-checker.lock.yml b/.github/workflows/api-coherence-checker.lock.yml index 4e1e198d8..5695a1692 100644 --- a/.github/workflows/api-coherence-checker.lock.yml +++ b/.github/workflows/api-coherence-checker.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.19). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -45,7 +45,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -82,7 +82,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory @@ -131,7 +131,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Install awf binary run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0 - name: Determine automatic lockdown mode for GitHub MCP server @@ -426,8 +426,8 @@ jobs: engine_name: "GitHub Copilot CLI", model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", - agent_version: "0.0.389", - cli_version: "v0.37.19", + agent_version: "0.0.394", + cli_version: "v0.37.23", workflow_name: "API Coherence Checker", experimental: false, supports_tools_allowlist: true, @@ -485,27 +485,8 @@ jobs: 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" - - --- - - ## Cache Folder Available - - You have access to a persistent cache folder at `/tmp/gh-aw/cache-memory/` where you can read and write files to create memories and store information. - - - **Read/Write Access**: You can freely read from and write to any files in this folder - - **Persistence**: Files in this folder 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 this as a simple file share - organize files as you see fit - - Examples of what you can store: - - `/tmp/gh-aw/cache-memory/notes.txt` - general notes and observations - - `/tmp/gh-aw/cache-memory/preferences.json` - user preferences and settings - - `/tmp/gh-aw/cache-memory/history.log` - activity history and logs - - `/tmp/gh-aw/cache-memory/state/` - organized state files in subdirectories - - Feel free to create, read, update, and organize files in this folder as needed for your tasks. - GitHub API Access Instructions @@ -733,6 +714,8 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_CACHE_DESCRIPTION: ${{ '' }} + GH_AW_CACHE_DIR: ${{ '/tmp/gh-aw/cache-memory/' }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} @@ -750,6 +733,8 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_CACHE_DESCRIPTION: process.env.GH_AW_CACHE_DESCRIPTION, + GH_AW_CACHE_DIR: process.env.GH_AW_CACHE_DIR, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, @@ -949,7 +934,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -1048,7 +1033,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -1132,7 +1117,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -1198,7 +1183,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -1235,7 +1220,7 @@ jobs: permissions: {} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download cache-memory artifact (default) diff --git a/.github/workflows/build-warning-fixer.lock.yml b/.github/workflows/build-warning-fixer.lock.yml index ef1d8e687..9bafd0c5b 100644 --- a/.github/workflows/build-warning-fixer.lock.yml +++ b/.github/workflows/build-warning-fixer.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.19). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -45,7 +45,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -82,7 +82,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Checkout repository @@ -121,7 +121,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Install awf binary run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0 - name: Determine automatic lockdown mode for GitHub MCP server @@ -418,8 +418,8 @@ jobs: engine_name: "GitHub Copilot CLI", model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", - agent_version: "0.0.389", - cli_version: "v0.37.19", + agent_version: "0.0.394", + cli_version: "v0.37.23", workflow_name: "Build Warning Fixer", experimental: false, supports_tools_allowlist: true, @@ -865,7 +865,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -981,7 +981,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -1065,7 +1065,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -1133,7 +1133,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact diff --git a/.github/workflows/code-conventions-analyzer.lock.yml b/.github/workflows/code-conventions-analyzer.lock.yml index 4e1d96754..fbae41e44 100644 --- a/.github/workflows/code-conventions-analyzer.lock.yml +++ b/.github/workflows/code-conventions-analyzer.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.22). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -44,7 +44,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -81,7 +81,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Checkout repository @@ -492,7 +492,7 @@ jobs: model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", agent_version: "0.0.394", - cli_version: "v0.37.22", + cli_version: "v0.37.23", workflow_name: "Code Conventions Analyzer", experimental: false, supports_tools_allowlist: true, @@ -603,24 +603,9 @@ jobs: ## Your Task - **PRIMARY FOCUS: Create Issues for std::optional Refactoring** + **PRIMARY FOCUS: Create Issues for Tuple Pattern (Structured Bindings) Refactoring** - Your primary task is to identify and **directly implement** refactorings that replace pointer-based optional patterns with `std::optional`. This workflow will: - - 1. **Find std::optional opportunities** - Functions returning null pointers to indicate absence or using output parameters - 2. **Implement the refactoring** - Use the `edit` tool to make actual code changes - 3. **Create issues** - Automatically create an issue with your changes for std::optional improvements - 4. **Create discussions for other findings** - For other code quality issues, create discussions (not issues) - - **Focus Areas for std::optional Refactoring:** - - Functions returning `nullptr` to indicate "no value" - - Functions using output parameters (pointer/reference parameters) to return optional results - - Boolean return + output parameter patterns (e.g., `bool get_value(T* out)`) - - APIs that would benefit from explicit optional semantics - - **SECONDARY FOCUS: Create Issues for Tuple Pattern (Structured Bindings) Refactoring** - - Your secondary task is to identify and implement refactorings that use C++17 structured bindings instead of accessing `.first` and `.second`: + Your primary task is to identify and implement refactorings that use C++17 structured bindings instead of accessing `.first` and `.second`: 1. **Find tuple/pair access patterns** - Code accessing `.first` and `.second` members 2. **Implement the refactoring** - Replace with structured bindings for clearer code @@ -650,9 +635,9 @@ jobs: return merge(n1, n2); ``` - **TERTIARY FOCUS: Create Issues for initializer_list Refactoring** + **SECONDARY FOCUS: Create Issues for initializer_list Refactoring** - Your tertiary task is to identify and implement refactorings that use `std::initializer_list` instead of array pointer + size parameters: + Your secondary task is to identify and implement refactorings that use `std::initializer_list` instead of array pointer + size parameters: 1. **Find array + size parameter patterns** - Functions taking `(unsigned sz, T* args)` or similar 2. **Implement the refactoring** - Replace with `std::initializer_list` for cleaner APIs @@ -692,127 +677,7 @@ jobs: Additionally, conduct analysis of other coding conventions and modern C++ opportunities for discussion (not immediate implementation) - ## Workflow for std::optional Refactoring (PRIMARY) - - ### Step A: Find std::optional Refactoring Opportunities - - 1. **Search for common patterns** that should use `std::optional`: - ```bash - # Functions returning nullptr to indicate absence - grep pattern: "return nullptr;" glob: "src/**/*.{cpp,h}" - - # Boolean return + output parameter patterns - grep pattern: "bool [a-z_]+\(.*\*" glob: "src/**/*.h" - grep pattern: "bool [a-z_]+\(.*&" glob: "src/**/*.h" - - # Functions with output parameters - grep pattern: "\([^,]+\*[^,]*\)" glob: "src/**/*.h" - ``` - - 2. **Analyze candidates** for refactoring: - - Use `view` to examine the function implementation - - Check if the function is part of the public API or internal - - Verify that the pattern is indeed optional (not always valid) - - Ensure the change would improve code clarity - - 3. **Select 1-3 high-value targets** per run: - - Prefer internal APIs over public APIs (less breaking) - - Choose functions with clear optional semantics - - Focus on functions with multiple call sites for broader impact - - ### Step B: Implement the Refactoring - - For each selected function: - - 1. **Update the function signature** in header file: - ```cpp - // Before: - bool get_something(T* result); - // or - T* find_something(); - - // After: - std::optional get_something(); - ``` - - 2. **Update the function implementation**: - ```cpp - // Before: - bool get_something(T* result) { - if (condition) { - *result = value; - return true; - } - return false; - } - - // After: - std::optional get_something() { - if (condition) { - return value; - } - return std::nullopt; - } - ``` - - 3. **Update all call sites** to use the new API: - ```cpp - // Before: - T result; - if (get_something(&result)) { - use(result); - } - - // After: - if (auto result = get_something()) { - use(*result); - } - ``` - - 4. **Verify the changes**: - - Use `grep` to find any remaining call sites - - Check that the refactoring is complete - - Ensure no compilation errors would occur - - ### Step C: Create the Issue - - Use the `output.create-issue` tool to create an issue with: - - **Title**: "Refactor [function_name] to use std::optional" - - **Description**: - - Explain what was changed - - Why std::optional is better (type safety, explicit semantics) - - List all modified files - - Note any caveats or considerations - - **Example issue description:** - ```markdown - # Refactor to use std::optional - - This PR refactors the following functions to use `std::optional` instead of pointer-based optional patterns: - - - `get_value()` in `src/util/some_file.cpp` - - `find_item()` in `src/ast/another_file.cpp` - - ## Benefits: - - Explicit optional semantics (no nullptr checks needed) - - Type safety (can't forget to check for absence) - - Modern C++17 idiom - - ## Changes: - - Updated function signatures to return `std::optional` - - Modified implementations to return `std::nullopt` instead of `nullptr` - - Updated all call sites to use optional idioms - - ## Testing: - - No functional changes to logic - - All existing call sites updated - ``` - - ### Step D: Create Discussion for Other Findings - - If you identify other code quality issues (naming, formatting, other C++ features), create a **discussion** (not a PR) with those findings using the existing discussion format from the workflow. - - ## Workflow for initializer_list Refactoring (TERTIARY) + ## Workflow for initializer_list Refactoring (SECONDARY) ### Step A: Find initializer_list Refactoring Opportunities @@ -1010,7 +875,6 @@ jobs: **C++17 features:** - Structured bindings for tuple/pair unpacking - `if constexpr` for compile-time conditionals - - **`std::optional` instead of pointer-based optional values** - **PRIMARY FOCUS: Implement these changes directly (see "Workflow for std::optional Refactoring" section near the beginning of this document)** - `std::string_view` for string parameters - Fold expressions for variadic templates - `[[nodiscard]]` and `[[maybe_unused]]` attributes @@ -1042,8 +906,6 @@ jobs: - Constructors with member initializers (may still be candidates for improvement) - Constructors that only initialize members to default values - **Empty destructors**: Trivial destructors that can be removed or use `= default` - PROMPT_EOF - cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - Destructors with empty body `~Class() {}` - Non-virtual destructors that don't need to be explicitly defined - Virtual destructors (keep explicit even if empty for polymorphic classes), @@ -1105,13 +967,8 @@ jobs: - Incorrect usage of `std::move` (moving from const references, etc.) - Return value optimization opportunities being blocked - **Optional Value Patterns:** - - **PRIMARY TASK**: Functions returning null + using output parameters - - **ACTION**: Replace with `std::optional` return values using the refactoring workflow above - - **RESULT**: Create an issue with the actual code changes (see "Workflow for std::optional Refactoring") - **Tuple/Pair Access Patterns:** - - **SECONDARY TASK**: Code accessing `.first` and `.second` on pairs/tuples + - **PRIMARY TASK**: Code accessing `.first` and `.second` on pairs/tuples - **ACTION**: Replace with C++17 structured bindings for cleaner, more readable code - **RESULT**: Create an issue with the actual code changes - **NAMING**: Use descriptive names based on types/semantics (e.g., `[n1, n2]` for `enode_pair`, `[k, v]` for maps) @@ -1162,6 +1019,8 @@ jobs: ## Analysis Methodology 1. **Sample key directories** in the codebase: + PROMPT_EOF + cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - `src/util/` - Core utilities and data structures - `src/ast/` - Abstract syntax tree implementations - `src/smt/` - SMT solver core @@ -1205,16 +1064,16 @@ jobs: ## Deliverables - ### PRIMARY: Issue for std::optional Refactoring + ### PRIMARY: Issues for Code Refactoring - If you implement std::optional refactoring (following the workflow above), create an issue using `output.create-issue` with: + When you implement refactorings (structured bindings, initializer_list), create issues using `output.create-issue` with: - Clear title indicating what was refactored - Description of changes and benefits - List of modified files and functions ### SECONDARY: Detailed Analysis Discussion - For other code quality findings (non-std::optional), create a comprehensive discussion with your findings structured as follows: + For other code quality findings, create a comprehensive discussion with your findings structured as follows: ### Discussion Title "Code Conventions Analysis - [Date] - [Key Finding Summary]" @@ -1435,30 +1294,14 @@ jobs: - **Simplification**: [Code that would be cleaner with auto cleanup] ### 4.7 Move Semantics Analysis - PROMPT_EOF - cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - **Missing std::move**: [Returns/assignments that should use move] - **Incorrect std::move**: [Move from const, unnecessary moves] - **Return Value Optimization**: [Places where RVO is blocked] - ### 4.8 Optional Value Pattern Modernization - **IMPLEMENT AS ISSUE** + ### 4.8 Tuple Pattern (Structured Bindings) Modernization - **IMPLEMENT AS ISSUE** **This is the PRIMARY focus area - implement these changes directly:** - - **Current Pattern**: Functions returning null + output parameters - - **Modern Pattern**: `std::optional` return value opportunities - - **Action**: Use the "Workflow for std::optional Refactoring" section above to: - 1. Find candidate functions - 2. Refactor using the `edit` tool - 3. Create an issue with your changes - - **API Improvements**: Specific function signatures to update - - **Examples**: File:line references with before/after code - - **Output**: Issue (not just discussion) - - ### 4.9 Tuple Pattern (Structured Bindings) Modernization - **IMPLEMENT AS ISSUE** - - **This is a SECONDARY focus area - implement these changes directly:** - - **Current Pattern**: Accessing `.first` and `.second` on pairs/tuples - **Modern Pattern**: Use C++17 structured bindings for cleaner code - **Benefits**: @@ -1514,21 +1357,21 @@ jobs: - Have sequential uses of both `.first` and `.second` - **Output**: Issue with refactored code - ### 4.10 Exception String Construction + ### 4.9 Exception String Construction - **Current**: [stringstream usage for building exception messages] - **Modern**: [std::format and std::formater opportunities] - **String Copies**: [Unnecessary copies when raising exceptions] - **Examples**: [Specific exception construction sites] - ### 4.11 Array Parameter Modernization (std::span) + ### 4.10 Array Parameter Modernization (std::span) - **Current**: [Pointer + size parameter pairs for runtime-sized arrays] - **Modern**: [std::span usage opportunities] - **Type Safety**: [How span improves API safety] - **Examples**: [Function signatures to update] - ### 4.12 Array Parameter Modernization (std::initializer_list) - **IMPLEMENT AS ISSUE** + ### 4.11 Array Parameter Modernization (std::initializer_list) - **IMPLEMENT AS ISSUE** - **This is a TERTIARY focus area - implement these changes directly:** + **This is a SECONDARY focus area - implement these changes directly:** - **Current Pattern**: Functions with `unsigned sz, T* args` or `unsigned sz, T* const* args` parameters - **Modern Pattern**: Use `std::initializer_list` for functions called with compile-time constant arrays @@ -1578,18 +1421,20 @@ jobs: - **Output**: Issue with refactored code - **Note**: Only apply to internal C++ APIs, not to public C API functions that need C compatibility - ### 4.13 Increment Operator Patterns + ### 4.12 Increment Operator Patterns - **Postfix Usage**: [Count of i++ where result is unused] - **Prefix Preference**: [Places to use ++i instead] + PROMPT_EOF + cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - **Iterator Loops**: [Heavy iterator usage areas] - ### 4.14 Exception Control Flow + ### 4.13 Exception Control Flow - **Current Usage**: [Exceptions used for normal control flow] - - **Modern Alternatives**: [std::expected, std::optional, error codes] + - **Modern Alternatives**: [std::expected or error codes] - **Performance**: [Impact of exception-based control flow] - **Refactoring Opportunities**: [Specific patterns to replace] - ### 4.15 Inefficient Stream Output + ### 4.14 Inefficient Stream Output - **Current Usage**: [string stream output operator used for single characters] - **Modern Alternatives**: [use char output operator] - **Performance**: [Reduce code size and improve performance] @@ -1894,17 +1739,15 @@ jobs: - Never execute untrusted code - Use `bash` only for safe operations (git, grep patterns) - PROMPT_EOF - cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT" - - **For std::optional refactoring**: Use the `edit` tool to modify files directly + - **For code refactoring (structured bindings, initializer_list)**: Use the `edit` tool to modify files directly - **For other findings**: Create discussions only (no code modifications) - - All code changes for std::optional will be reviewed through the issue process + - All code changes will be reviewed through the issue process ## Output Requirements **Two types of outputs:** - 1. **Issue** (for std::optional refactoring): + 1. **Issue** (for refactorings like structured bindings or initializer_list): - Use `output.create-issue` to create an issue - Include clear title and description - List all modified files @@ -2157,7 +2000,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -2258,7 +2101,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -2409,7 +2252,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -2446,7 +2289,7 @@ jobs: permissions: {} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.22 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download cache-memory artifact (default) diff --git a/.github/workflows/code-conventions-analyzer.md b/.github/workflows/code-conventions-analyzer.md index f0819faca..019f8dfbf 100644 --- a/.github/workflows/code-conventions-analyzer.md +++ b/.github/workflows/code-conventions-analyzer.md @@ -38,24 +38,9 @@ You are an expert C++ code quality analyst specializing in the Z3 theorem prover ## Your Task -**PRIMARY FOCUS: Create Issues for std::optional Refactoring** +**PRIMARY FOCUS: Create Issues for Tuple Pattern (Structured Bindings) Refactoring** -Your primary task is to identify and **directly implement** refactorings that replace pointer-based optional patterns with `std::optional`. This workflow will: - -1. **Find std::optional opportunities** - Functions returning null pointers to indicate absence or using output parameters -2. **Implement the refactoring** - Use the `edit` tool to make actual code changes -3. **Create issues** - Automatically create an issue with your changes for std::optional improvements -4. **Create discussions for other findings** - For other code quality issues, create discussions (not issues) - -**Focus Areas for std::optional Refactoring:** -- Functions returning `nullptr` to indicate "no value" -- Functions using output parameters (pointer/reference parameters) to return optional results -- Boolean return + output parameter patterns (e.g., `bool get_value(T* out)`) -- APIs that would benefit from explicit optional semantics - -**SECONDARY FOCUS: Create Issues for Tuple Pattern (Structured Bindings) Refactoring** - -Your secondary task is to identify and implement refactorings that use C++17 structured bindings instead of accessing `.first` and `.second`: +Your primary task is to identify and implement refactorings that use C++17 structured bindings instead of accessing `.first` and `.second`: 1. **Find tuple/pair access patterns** - Code accessing `.first` and `.second` members 2. **Implement the refactoring** - Replace with structured bindings for clearer code @@ -85,9 +70,9 @@ auto [n1, n2] = get_pair(y); return merge(n1, n2); ``` -**TERTIARY FOCUS: Create Issues for initializer_list Refactoring** +**SECONDARY FOCUS: Create Issues for initializer_list Refactoring** -Your tertiary task is to identify and implement refactorings that use `std::initializer_list` instead of array pointer + size parameters: +Your secondary task is to identify and implement refactorings that use `std::initializer_list` instead of array pointer + size parameters: 1. **Find array + size parameter patterns** - Functions taking `(unsigned sz, T* args)` or similar 2. **Implement the refactoring** - Replace with `std::initializer_list` for cleaner APIs @@ -127,127 +112,7 @@ foo({1, 2}); Additionally, conduct analysis of other coding conventions and modern C++ opportunities for discussion (not immediate implementation) -## Workflow for std::optional Refactoring (PRIMARY) - -### Step A: Find std::optional Refactoring Opportunities - -1. **Search for common patterns** that should use `std::optional`: - ```bash - # Functions returning nullptr to indicate absence - grep pattern: "return nullptr;" glob: "src/**/*.{cpp,h}" - - # Boolean return + output parameter patterns - grep pattern: "bool [a-z_]+\(.*\*" glob: "src/**/*.h" - grep pattern: "bool [a-z_]+\(.*&" glob: "src/**/*.h" - - # Functions with output parameters - grep pattern: "\([^,]+\*[^,]*\)" glob: "src/**/*.h" - ``` - -2. **Analyze candidates** for refactoring: - - Use `view` to examine the function implementation - - Check if the function is part of the public API or internal - - Verify that the pattern is indeed optional (not always valid) - - Ensure the change would improve code clarity - -3. **Select 1-3 high-value targets** per run: - - Prefer internal APIs over public APIs (less breaking) - - Choose functions with clear optional semantics - - Focus on functions with multiple call sites for broader impact - -### Step B: Implement the Refactoring - -For each selected function: - -1. **Update the function signature** in header file: - ```cpp - // Before: - bool get_something(T* result); - // or - T* find_something(); - - // After: - std::optional get_something(); - ``` - -2. **Update the function implementation**: - ```cpp - // Before: - bool get_something(T* result) { - if (condition) { - *result = value; - return true; - } - return false; - } - - // After: - std::optional get_something() { - if (condition) { - return value; - } - return std::nullopt; - } - ``` - -3. **Update all call sites** to use the new API: - ```cpp - // Before: - T result; - if (get_something(&result)) { - use(result); - } - - // After: - if (auto result = get_something()) { - use(*result); - } - ``` - -4. **Verify the changes**: - - Use `grep` to find any remaining call sites - - Check that the refactoring is complete - - Ensure no compilation errors would occur - -### Step C: Create the Issue - -Use the `output.create-issue` tool to create an issue with: -- **Title**: "Refactor [function_name] to use std::optional" -- **Description**: - - Explain what was changed - - Why std::optional is better (type safety, explicit semantics) - - List all modified files - - Note any caveats or considerations - -**Example issue description:** -```markdown -# Refactor to use std::optional - -This PR refactors the following functions to use `std::optional` instead of pointer-based optional patterns: - -- `get_value()` in `src/util/some_file.cpp` -- `find_item()` in `src/ast/another_file.cpp` - -## Benefits: -- Explicit optional semantics (no nullptr checks needed) -- Type safety (can't forget to check for absence) -- Modern C++17 idiom - -## Changes: -- Updated function signatures to return `std::optional` -- Modified implementations to return `std::nullopt` instead of `nullptr` -- Updated all call sites to use optional idioms - -## Testing: -- No functional changes to logic -- All existing call sites updated -``` - -### Step D: Create Discussion for Other Findings - -If you identify other code quality issues (naming, formatting, other C++ features), create a **discussion** (not a PR) with those findings using the existing discussion format from the workflow. - -## Workflow for initializer_list Refactoring (TERTIARY) +## Workflow for initializer_list Refactoring (SECONDARY) ### Step A: Find initializer_list Refactoring Opportunities @@ -445,7 +310,6 @@ Z3 uses C++20 (as specified in `.clang-format`). Look for opportunities to use: **C++17 features:** - Structured bindings for tuple/pair unpacking - `if constexpr` for compile-time conditionals -- **`std::optional` instead of pointer-based optional values** - **PRIMARY FOCUS: Implement these changes directly (see "Workflow for std::optional Refactoring" section near the beginning of this document)** - `std::string_view` for string parameters - Fold expressions for variadic templates - `[[nodiscard]]` and `[[maybe_unused]]` attributes @@ -538,13 +402,8 @@ Identify opportunities specific to Z3's architecture and coding patterns: - Incorrect usage of `std::move` (moving from const references, etc.) - Return value optimization opportunities being blocked -**Optional Value Patterns:** -- **PRIMARY TASK**: Functions returning null + using output parameters -- **ACTION**: Replace with `std::optional` return values using the refactoring workflow above -- **RESULT**: Create an issue with the actual code changes (see "Workflow for std::optional Refactoring") - **Tuple/Pair Access Patterns:** -- **SECONDARY TASK**: Code accessing `.first` and `.second` on pairs/tuples +- **PRIMARY TASK**: Code accessing `.first` and `.second` on pairs/tuples - **ACTION**: Replace with C++17 structured bindings for cleaner, more readable code - **RESULT**: Create an issue with the actual code changes - **NAMING**: Use descriptive names based on types/semantics (e.g., `[n1, n2]` for `enode_pair`, `[k, v]` for maps) @@ -638,16 +497,16 @@ Identify opportunities specific to Z3's architecture and coding patterns: ## Deliverables -### PRIMARY: Issue for std::optional Refactoring +### PRIMARY: Issues for Code Refactoring -If you implement std::optional refactoring (following the workflow above), create an issue using `output.create-issue` with: +When you implement refactorings (structured bindings, initializer_list), create issues using `output.create-issue` with: - Clear title indicating what was refactored - Description of changes and benefits - List of modified files and functions ### SECONDARY: Detailed Analysis Discussion -For other code quality findings (non-std::optional), create a comprehensive discussion with your findings structured as follows: +For other code quality findings, create a comprehensive discussion with your findings structured as follows: ### Discussion Title "Code Conventions Analysis - [Date] - [Key Finding Summary]" @@ -872,24 +731,10 @@ For each opportunity, provide: - **Incorrect std::move**: [Move from const, unnecessary moves] - **Return Value Optimization**: [Places where RVO is blocked] -### 4.8 Optional Value Pattern Modernization - **IMPLEMENT AS ISSUE** +### 4.8 Tuple Pattern (Structured Bindings) Modernization - **IMPLEMENT AS ISSUE** **This is the PRIMARY focus area - implement these changes directly:** -- **Current Pattern**: Functions returning null + output parameters -- **Modern Pattern**: `std::optional` return value opportunities -- **Action**: Use the "Workflow for std::optional Refactoring" section above to: - 1. Find candidate functions - 2. Refactor using the `edit` tool - 3. Create an issue with your changes -- **API Improvements**: Specific function signatures to update -- **Examples**: File:line references with before/after code -- **Output**: Issue (not just discussion) - -### 4.9 Tuple Pattern (Structured Bindings) Modernization - **IMPLEMENT AS ISSUE** - -**This is a SECONDARY focus area - implement these changes directly:** - - **Current Pattern**: Accessing `.first` and `.second` on pairs/tuples - **Modern Pattern**: Use C++17 structured bindings for cleaner code - **Benefits**: @@ -945,21 +790,21 @@ For each opportunity, provide: - Have sequential uses of both `.first` and `.second` - **Output**: Issue with refactored code -### 4.10 Exception String Construction +### 4.9 Exception String Construction - **Current**: [stringstream usage for building exception messages] - **Modern**: [std::format and std::formater opportunities] - **String Copies**: [Unnecessary copies when raising exceptions] - **Examples**: [Specific exception construction sites] -### 4.11 Array Parameter Modernization (std::span) +### 4.10 Array Parameter Modernization (std::span) - **Current**: [Pointer + size parameter pairs for runtime-sized arrays] - **Modern**: [std::span usage opportunities] - **Type Safety**: [How span improves API safety] - **Examples**: [Function signatures to update] -### 4.12 Array Parameter Modernization (std::initializer_list) - **IMPLEMENT AS ISSUE** +### 4.11 Array Parameter Modernization (std::initializer_list) - **IMPLEMENT AS ISSUE** -**This is a TERTIARY focus area - implement these changes directly:** +**This is a SECONDARY focus area - implement these changes directly:** - **Current Pattern**: Functions with `unsigned sz, T* args` or `unsigned sz, T* const* args` parameters - **Modern Pattern**: Use `std::initializer_list` for functions called with compile-time constant arrays @@ -1009,18 +854,18 @@ For each opportunity, provide: - **Output**: Issue with refactored code - **Note**: Only apply to internal C++ APIs, not to public C API functions that need C compatibility -### 4.13 Increment Operator Patterns +### 4.12 Increment Operator Patterns - **Postfix Usage**: [Count of i++ where result is unused] - **Prefix Preference**: [Places to use ++i instead] - **Iterator Loops**: [Heavy iterator usage areas] -### 4.14 Exception Control Flow +### 4.13 Exception Control Flow - **Current Usage**: [Exceptions used for normal control flow] -- **Modern Alternatives**: [std::expected, std::optional, error codes] +- **Modern Alternatives**: [std::expected or error codes] - **Performance**: [Impact of exception-based control flow] - **Refactoring Opportunities**: [Specific patterns to replace] -### 4.15 Inefficient Stream Output +### 4.14 Inefficient Stream Output - **Current Usage**: [string stream output operator used for single characters] - **Modern Alternatives**: [use char output operator] - **Performance**: [Reduce code size and improve performance] @@ -1325,15 +1170,15 @@ grep pattern: "<<\s*\".*\"\s*<<\s*\".*\"" glob: "src/**/*.cpp" - Never execute untrusted code - Use `bash` only for safe operations (git, grep patterns) -- **For std::optional refactoring**: Use the `edit` tool to modify files directly +- **For code refactoring (structured bindings, initializer_list)**: Use the `edit` tool to modify files directly - **For other findings**: Create discussions only (no code modifications) -- All code changes for std::optional will be reviewed through the issue process +- All code changes will be reviewed through the issue process ## Output Requirements **Two types of outputs:** -1. **Issue** (for std::optional refactoring): +1. **Issue** (for refactorings like structured bindings or initializer_list): - Use `output.create-issue` to create an issue - Include clear title and description - List all modified files diff --git a/.github/workflows/release-notes-updater.lock.yml b/.github/workflows/release-notes-updater.lock.yml index 41e0d4a50..bd23da579 100644 --- a/.github/workflows/release-notes-updater.lock.yml +++ b/.github/workflows/release-notes-updater.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.19). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -45,7 +45,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -82,7 +82,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory @@ -122,7 +122,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Install awf binary run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0 - name: Determine automatic lockdown mode for GitHub MCP server @@ -409,8 +409,8 @@ jobs: engine_name: "GitHub Copilot CLI", model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", - agent_version: "0.0.389", - cli_version: "v0.37.19", + agent_version: "0.0.394", + cli_version: "v0.37.23", workflow_name: "Release Notes Updater", experimental: false, supports_tools_allowlist: true, @@ -912,7 +912,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -1011,7 +1011,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -1095,7 +1095,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -1161,7 +1161,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact diff --git a/.github/workflows/soundness-bug-detector.lock.yml b/.github/workflows/soundness-bug-detector.lock.yml index 936c769aa..87f3540ad 100644 --- a/.github/workflows/soundness-bug-detector.lock.yml +++ b/.github/workflows/soundness-bug-detector.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.19). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -49,7 +49,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -84,7 +84,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory @@ -133,7 +133,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Install awf binary run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0 - name: Determine automatic lockdown mode for GitHub MCP server @@ -455,8 +455,8 @@ jobs: engine_name: "GitHub Copilot CLI", model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", - agent_version: "0.0.389", - cli_version: "v0.37.19", + agent_version: "0.0.394", + cli_version: "v0.37.23", workflow_name: "Soundness Bug Detector", experimental: false, supports_tools_allowlist: true, @@ -513,27 +513,8 @@ jobs: 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" - - --- - - ## Cache Folder Available - - You have access to a persistent cache folder at `/tmp/gh-aw/cache-memory/` where you can read and write files to create memories and store information. - - - **Read/Write Access**: You can freely read from and write to any files in this folder - - **Persistence**: Files in this folder 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 this as a simple file share - organize files as you see fit - - Examples of what you can store: - - `/tmp/gh-aw/cache-memory/notes.txt` - general notes and observations - - `/tmp/gh-aw/cache-memory/preferences.json` - user preferences and settings - - `/tmp/gh-aw/cache-memory/history.log` - activity history and logs - - `/tmp/gh-aw/cache-memory/state/` - organized state files in subdirectories - - Feel free to create, read, update, and organize files in this folder as needed for your tasks. - GitHub API Access Instructions @@ -588,6 +569,8 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_CACHE_DESCRIPTION: ${{ '' }} + GH_AW_CACHE_DIR: ${{ '/tmp/gh-aw/cache-memory/' }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} @@ -604,6 +587,8 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_CACHE_DESCRIPTION: process.env.GH_AW_CACHE_DESCRIPTION, + GH_AW_CACHE_DIR: process.env.GH_AW_CACHE_DIR, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, @@ -800,7 +785,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -899,7 +884,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -983,7 +968,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -1051,7 +1036,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -1088,7 +1073,7 @@ jobs: permissions: {} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download cache-memory artifact (default) diff --git a/.github/workflows/workflow-suggestion-agent.lock.yml b/.github/workflows/workflow-suggestion-agent.lock.yml index 51f22196f..ab9baaffd 100644 --- a/.github/workflows/workflow-suggestion-agent.lock.yml +++ b/.github/workflows/workflow-suggestion-agent.lock.yml @@ -13,7 +13,7 @@ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ # -# This file was automatically generated by gh-aw (v0.37.19). DO NOT EDIT. +# This file was automatically generated by gh-aw (v0.37.23). DO NOT EDIT. # # To update this file, edit the corresponding .md file and run: # gh aw compile @@ -45,7 +45,7 @@ jobs: comment_repo: "" steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Check workflow file timestamps @@ -82,7 +82,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory @@ -131,7 +131,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Install awf binary run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0 - name: Determine automatic lockdown mode for GitHub MCP server @@ -426,8 +426,8 @@ jobs: engine_name: "GitHub Copilot CLI", model: process.env.GH_AW_MODEL_AGENT_COPILOT || "", version: "", - agent_version: "0.0.389", - cli_version: "v0.37.19", + agent_version: "0.0.394", + cli_version: "v0.37.23", workflow_name: "Workflow Suggestion Agent", experimental: false, supports_tools_allowlist: true, @@ -485,27 +485,8 @@ jobs: 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" - - --- - - ## Cache Folder Available - - You have access to a persistent cache folder at `/tmp/gh-aw/cache-memory/` where you can read and write files to create memories and store information. - - - **Read/Write Access**: You can freely read from and write to any files in this folder - - **Persistence**: Files in this folder 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 this as a simple file share - organize files as you see fit - - Examples of what you can store: - - `/tmp/gh-aw/cache-memory/notes.txt` - general notes and observations - - `/tmp/gh-aw/cache-memory/preferences.json` - user preferences and settings - - `/tmp/gh-aw/cache-memory/history.log` - activity history and logs - - `/tmp/gh-aw/cache-memory/state/` - organized state files in subdirectories - - Feel free to create, read, update, and organize files in this folder as needed for your tasks. - GitHub API Access Instructions @@ -906,6 +887,8 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt + GH_AW_CACHE_DESCRIPTION: ${{ '' }} + GH_AW_CACHE_DIR: ${{ '/tmp/gh-aw/cache-memory/' }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} @@ -923,6 +906,8 @@ jobs: return await substitutePlaceholders({ file: process.env.GH_AW_PROMPT, substitutions: { + GH_AW_CACHE_DESCRIPTION: process.env.GH_AW_CACHE_DESCRIPTION, + GH_AW_CACHE_DIR: process.env.GH_AW_CACHE_DIR, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, @@ -1122,7 +1107,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Debug job inputs @@ -1221,7 +1206,7 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent artifacts @@ -1305,7 +1290,7 @@ jobs: env: COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - name: Install GitHub Copilot CLI - run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389 + run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.394 - name: Execute GitHub Copilot CLI id: agentic_execution # Copilot CLI tool arguments (sorted): @@ -1371,7 +1356,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -1408,7 +1393,7 @@ jobs: permissions: {} steps: - name: Setup Scripts - uses: githubnext/gh-aw/actions/setup@v0.37.19 + uses: githubnext/gh-aw/actions/setup@v0.37.23 with: destination: /opt/gh-aw/actions - name: Download cache-memory artifact (default)