diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml
index 17c58bf588..0af3d715c0 100644
--- a/.github/workflows/agent-performance-analyzer.lock.yml
+++ b/.github/workflows/agent-performance-analyzer.lock.yml
@@ -110,37 +110,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -256,6 +227,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/meta-orchestrators'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**Constraints:**
+- **Allowed Files**: Only files matching patterns: **
+- **Max File Size**: 102400 bytes (0.10 MB) per file
+- **Max File Count**: 100 files per commit
+'
+ GH_AW_MEMORY_DESCRIPTION: ''
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -276,6 +258,11 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml
index 7c0781ec89..4bcd6a7157 100644
--- a/.github/workflows/audit-workflows.lock.yml
+++ b/.github/workflows/audit-workflows.lock.yml
@@ -111,37 +111,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -267,6 +238,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/audit-workflows'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical audit data and patterns'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -288,7 +270,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/code-scanning-fixer.lock.yml b/.github/workflows/code-scanning-fixer.lock.yml
index d0c807c8eb..52a8b81446 100644
--- a/.github/workflows/code-scanning-fixer.lock.yml
+++ b/.github/workflows/code-scanning-fixer.lock.yml
@@ -105,34 +105,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt_multi.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: ``. Files with other extensions will be rejected during validation.
-
- Examples of what you can store:
- - `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
- - `/tmp/gh-aw/repo-memory/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/history/` - organized history files (with allowed file types)
-
- Feel free to create, read, update, and organize files in these folders as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -249,6 +223,9 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_ALLOWED_EXTENSIONS: ''
+ GH_AW_MEMORY_LIST: '- **campaigns**: `/tmp/gh-aw/repo-memory/campaigns/` (branch: `memory/campaigns`)
+'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -272,6 +249,8 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_ALLOWED_EXTENSIONS: process.env.GH_AW_MEMORY_ALLOWED_EXTENSIONS,
+ GH_AW_MEMORY_LIST: process.env.GH_AW_MEMORY_LIST,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml
index e9cc08d192..87ba966eb3 100644
--- a/.github/workflows/copilot-agent-analysis.lock.yml
+++ b/.github/workflows/copilot-agent-analysis.lock.yml
@@ -111,37 +111,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -259,6 +230,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/copilot-agent-analysis'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical agent performance metrics'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -280,7 +262,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/copilot-cli-deep-research.lock.yml b/.github/workflows/copilot-cli-deep-research.lock.yml
index ce49ba542a..417dcec080 100644
--- a/.github/workflows/copilot-cli-deep-research.lock.yml
+++ b/.github/workflows/copilot-cli-deep-research.lock.yml
@@ -108,37 +108,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -249,6 +220,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/copilot-cli-research'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Copilot CLI research notes and analysis history'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -267,7 +249,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml
index 1cf812a4bd..64ae2b8bc0 100644
--- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml
+++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml
@@ -111,37 +111,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -271,6 +242,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/nlp-analysis'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical NLP analysis results'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -292,7 +274,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml
index 011771bcfb..f37782eae5 100644
--- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml
+++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml
@@ -111,37 +111,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -260,6 +231,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/prompt-analysis'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical prompt pattern analysis'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -281,7 +263,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/copilot-session-insights.lock.yml b/.github/workflows/copilot-session-insights.lock.yml
index 6676f2d9ee..abb1d02ddc 100644
--- a/.github/workflows/copilot-session-insights.lock.yml
+++ b/.github/workflows/copilot-session-insights.lock.yml
@@ -115,37 +115,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -283,6 +254,17 @@ jobs:
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKFLOW: ${{ github.workflow }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/session-insights'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical session analysis data'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -305,7 +287,12 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKFLOW: process.env.GH_AW_GITHUB_WORKFLOW,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml
index 6a29f02bfb..54e6434ec8 100644
--- a/.github/workflows/daily-cli-performance.lock.yml
+++ b/.github/workflows/daily-cli-performance.lock.yml
@@ -110,37 +110,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -259,6 +230,17 @@ jobs:
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_SERVER_URL: ${{ github.server_url }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/cli-performance'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical CLI compilation performance benchmark results'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -278,7 +260,12 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_SERVER_URL: process.env.GH_AW_GITHUB_SERVER_URL,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml
index ccd1c8f4f2..bb1d5e8c6f 100644
--- a/.github/workflows/daily-code-metrics.lock.yml
+++ b/.github/workflows/daily-code-metrics.lock.yml
@@ -111,37 +111,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -266,6 +237,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'daily/default'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical code quality and health metrics'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -287,7 +269,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml
index b6eb0fc8c7..69ae04dafb 100644
--- a/.github/workflows/daily-copilot-token-report.lock.yml
+++ b/.github/workflows/daily-copilot-token-report.lock.yml
@@ -110,37 +110,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -263,6 +234,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/token-metrics'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical token consumption and cost data'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -284,7 +266,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml
index ddc3e237c8..b4ec76ca3b 100644
--- a/.github/workflows/daily-news.lock.yml
+++ b/.github/workflows/daily-news.lock.yml
@@ -112,37 +112,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -273,6 +244,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/daily-news'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Historical news digest data'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -294,7 +276,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml
index c16fee325c..a2b7885b60 100644
--- a/.github/workflows/daily-testify-uber-super-expert.lock.yml
+++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml
@@ -112,37 +112,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -255,6 +226,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/testify-expert'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Tracks processed test files to avoid duplicates'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -275,6 +257,11 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml
index ce79cfd89b..e2dd8732a2 100644
--- a/.github/workflows/deep-report.lock.yml
+++ b/.github/workflows/deep-report.lock.yml
@@ -110,37 +110,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -269,6 +240,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/deep-report'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Long-term insights, patterns, and trend data'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -290,7 +272,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/delight.lock.yml b/.github/workflows/delight.lock.yml
index 3644164e70..6e463ccfd9 100644
--- a/.github/workflows/delight.lock.yml
+++ b/.github/workflows/delight.lock.yml
@@ -109,37 +109,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -256,6 +227,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/delight'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Track delight findings and historical patterns'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -274,7 +256,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/discussion-task-miner.lock.yml b/.github/workflows/discussion-task-miner.lock.yml
index 59028e710d..606036f2fb 100644
--- a/.github/workflows/discussion-task-miner.lock.yml
+++ b/.github/workflows/discussion-task-miner.lock.yml
@@ -109,37 +109,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -254,6 +225,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/discussion-task-miner'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Track processed discussions and extracted tasks'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -272,7 +254,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml
index 98c195a6f2..f021573a2b 100644
--- a/.github/workflows/firewall-escape.lock.yml
+++ b/.github/workflows/firewall-escape.lock.yml
@@ -127,36 +127,8 @@ jobs:
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 "/opt/gh-aw/prompts/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -265,6 +237,16 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/firewall-escape'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**Constraints:**
+- **Max File Size**: 524288 bytes (0.50 MB) per file
+- **Max File Count**: 50 files per commit
+'
+ GH_AW_MEMORY_DESCRIPTION: ' Persistent storage for firewall escape attempt history and strategies'
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -288,6 +270,11 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml
index 0c142b9ba5..1456a666a0 100644
--- a/.github/workflows/metrics-collector.lock.yml
+++ b/.github/workflows/metrics-collector.lock.yml
@@ -105,37 +105,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -194,6 +165,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/meta-orchestrators'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**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
+'
+ GH_AW_MEMORY_DESCRIPTION: ''
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -214,6 +196,11 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/.github/workflows/pr-triage-agent.lock.yml b/.github/workflows/pr-triage-agent.lock.yml
index 7730e54df0..957b2aa21e 100644
--- a/.github/workflows/pr-triage-agent.lock.yml
+++ b/.github/workflows/pr-triage-agent.lock.yml
@@ -103,37 +103,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -248,6 +219,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/pr-triage'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**Constraints:**
+- **Allowed Files**: Only files matching patterns: **
+- **Max File Size**: 102400 bytes (0.10 MB) per file
+- **Max File Count**: 100 files per commit
+'
+ GH_AW_MEMORY_DESCRIPTION: ''
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -266,7 +248,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/security-compliance.lock.yml b/.github/workflows/security-compliance.lock.yml
index 379fc6a3b4..d3246893f9 100644
--- a/.github/workflows/security-compliance.lock.yml
+++ b/.github/workflows/security-compliance.lock.yml
@@ -128,37 +128,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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/campaigns` 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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **Constraints:**
- - **Allowed Files**: Only files matching patterns: memory/campaigns/security-compliance-*/**
- - **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -270,6 +241,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/campaigns'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**Constraints:**
+- **Allowed Files**: Only files matching patterns: memory/campaigns/security-compliance-*/**
+- **Max File Size**: 10240 bytes (0.01 MB) per file
+- **Max File Count**: 100 files per commit
+'
+ GH_AW_MEMORY_DESCRIPTION: ''
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
with:
script: |
const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
@@ -291,7 +273,12 @@ jobs:
GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER: process.env.GH_AW_GITHUB_EVENT_PULL_REQUEST_NUMBER,
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO
}
});
- name: Validate prompt placeholders
diff --git a/.github/workflows/workflow-health-manager.lock.yml b/.github/workflows/workflow-health-manager.lock.yml
index fad75cbab8..0ae017783d 100644
--- a/.github/workflows/workflow-health-manager.lock.yml
+++ b/.github/workflows/workflow-health-manager.lock.yml
@@ -110,37 +110,8 @@ jobs:
cat "/opt/gh-aw/prompts/xpia.md" >> "$GH_AW_PROMPT"
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/repo_memory_prompt.md" >> "$GH_AW_PROMPT"
cat << 'GH_AW_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
- - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.
-
- **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/notes.txt` - plain text notes
- - `/tmp/gh-aw/repo-memory/default/state.json` - structured state data
- - `/tmp/gh-aw/repo-memory/default/history.jsonl` - activity history in JSON Lines format
- - `/tmp/gh-aw/repo-memory/default/data.csv` - tabular data
- - `/tmp/gh-aw/repo-memory/default/history/` - organized history files in subdirectories (with allowed file types)
-
- Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
-
-
GitHub API Access Instructions
@@ -256,6 +227,17 @@ jobs:
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
+ GH_AW_MEMORY_BRANCH_NAME: 'memory/meta-orchestrators'
+ GH_AW_MEMORY_CONSTRAINTS: '
+
+**Constraints:**
+- **Allowed Files**: Only files matching patterns: **
+- **Max File Size**: 102400 bytes (0.10 MB) per file
+- **Max File Count**: 100 files per commit
+'
+ GH_AW_MEMORY_DESCRIPTION: ''
+ GH_AW_MEMORY_DIR: '/tmp/gh-aw/repo-memory/default/'
+ GH_AW_MEMORY_TARGET_REPO: ' of the current repository'
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
with:
script: |
@@ -276,6 +258,11 @@ jobs:
GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
+ GH_AW_MEMORY_BRANCH_NAME: process.env.GH_AW_MEMORY_BRANCH_NAME,
+ GH_AW_MEMORY_CONSTRAINTS: process.env.GH_AW_MEMORY_CONSTRAINTS,
+ GH_AW_MEMORY_DESCRIPTION: process.env.GH_AW_MEMORY_DESCRIPTION,
+ GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR,
+ GH_AW_MEMORY_TARGET_REPO: process.env.GH_AW_MEMORY_TARGET_REPO,
GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
}
});
diff --git a/actions/setup/md/repo_memory_prompt.md b/actions/setup/md/repo_memory_prompt.md
new file mode 100644
index 0000000000..e706dc5492
--- /dev/null
+++ b/actions/setup/md/repo_memory_prompt.md
@@ -0,0 +1,21 @@
+
+## Repo Memory Available
+
+You have access to a persistent repo memory folder at `__GH_AW_MEMORY_DIR__` where you can read and write files that are stored in a git branch.__GH_AW_MEMORY_DESCRIPTION__
+
+- **Read/Write Access**: You can freely read from and write to any files in this folder
+- **Git Branch Storage**: Files are stored in the `__GH_AW_MEMORY_BRANCH_NAME__` branch__GH_AW_MEMORY_TARGET_REPO__
+- **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
+- **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.__GH_AW_MEMORY_CONSTRAINTS__
+Examples of what you can store:
+- `__GH_AW_MEMORY_DIR__notes.md` - general notes and observations
+- `__GH_AW_MEMORY_DIR__notes.txt` - plain text notes
+- `__GH_AW_MEMORY_DIR__state.json` - structured state data
+- `__GH_AW_MEMORY_DIR__history.jsonl` - activity history in JSON Lines format
+- `__GH_AW_MEMORY_DIR__data.csv` - tabular data
+- `__GH_AW_MEMORY_DIR__history/` - organized history files in subdirectories (with allowed file types)
+
+Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.
+
diff --git a/actions/setup/md/repo_memory_prompt_multi.md b/actions/setup/md/repo_memory_prompt_multi.md
new file mode 100644
index 0000000000..7d1741b347
--- /dev/null
+++ b/actions/setup/md/repo_memory_prompt_multi.md
@@ -0,0 +1,23 @@
+
+## 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:
+
+__GH_AW_MEMORY_LIST__
+- **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
+- **Allowed File Types**: Only the following file extensions are allowed: `__GH_AW_MEMORY_ALLOWED_EXTENSIONS__`. Files with other extensions will be rejected during validation.
+
+Examples of what you can store:
+- `/tmp/gh-aw/repo-memory/notes.md` - general notes and observations
+- `/tmp/gh-aw/repo-memory/notes.txt` - plain text notes
+- `/tmp/gh-aw/repo-memory/state.json` - structured state data
+- `/tmp/gh-aw/repo-memory/history.jsonl` - activity history in JSON Lines format
+- `/tmp/gh-aw/repo-memory/data.csv` - tabular data
+- `/tmp/gh-aw/repo-memory/history/` - organized history files (with allowed file types)
+
+Feel free to create, read, update, and organize files in these folders as needed for your tasks, using only the allowed file types.
+
diff --git a/pkg/workflow/repo_memory_integration_test.go b/pkg/workflow/repo_memory_integration_test.go
index 9f3b7fcb7a..0a977810ff 100644
--- a/pkg/workflow/repo_memory_integration_test.go
+++ b/pkg/workflow/repo_memory_integration_test.go
@@ -58,9 +58,9 @@ This workflow uses repo memory.
t.Error("Expected push step in compiled workflow")
}
- // Check for prompt
- if !strings.Contains(lockFile, "## Repo Memory Available") {
- t.Error("Expected repo memory prompt in compiled workflow")
+ // Check for prompt template file reference
+ if !strings.Contains(lockFile, "repo_memory_prompt.md") {
+ t.Error("Expected repo memory template file reference in compiled workflow")
}
// Check for memory directory path
@@ -189,9 +189,9 @@ This workflow uses multiple repo memories.
t.Error("Expected logs memory directory")
}
- // Check for plural form in prompt
- if !strings.Contains(lockFile, "## Repo Memory Locations Available") {
- t.Error("Expected plural form in prompt for multiple memories")
+ // Check for plural form in prompt (multi template is used for multiple memories)
+ if !strings.Contains(lockFile, "repo_memory_prompt_multi.md") {
+ t.Error("Expected multi memory template file reference for multiple memories")
}
}
diff --git a/pkg/workflow/repo_memory_path_consistency_test.go b/pkg/workflow/repo_memory_path_consistency_test.go
index 494ef97dee..8de7db8557 100644
--- a/pkg/workflow/repo_memory_path_consistency_test.go
+++ b/pkg/workflow/repo_memory_path_consistency_test.go
@@ -75,17 +75,20 @@ func TestRepoMemoryPathConsistencyAcrossLayers(t *testing.T) {
RepoMemoryConfig: config,
}
- // Test 1: Validate prompt path (with trailing slash)
- var promptBuilder strings.Builder
- generateRepoMemoryPromptSection(&promptBuilder, config)
- promptOutput := promptBuilder.String()
-
- assert.Contains(t, promptOutput, tt.expectedPromptPath,
- "Prompt should contain memory path with trailing slash")
-
- // Verify trailing slash is present
- assert.Contains(t, promptOutput, tt.expectedPromptPath,
- "Prompt path must have trailing slash to indicate directory")
+ // Test 1: Validate prompt section uses correct memory path (with trailing slash)
+ section := buildRepoMemoryPromptSection(config)
+ require.NotNil(t, section, "Should have a prompt section")
+ assert.True(t, section.IsFile, "Should use template file")
+
+ // For single default memory, the path is in GH_AW_MEMORY_DIR
+ // For non-default or multiple memories, the path is in GH_AW_MEMORY_LIST
+ if config.Memories[0].ID == "default" && len(config.Memories) == 1 {
+ assert.Equal(t, tt.expectedPromptPath, section.EnvVars["GH_AW_MEMORY_DIR"],
+ "Prompt should contain memory path with trailing slash")
+ } else {
+ assert.Contains(t, section.EnvVars["GH_AW_MEMORY_LIST"], tt.expectedPromptPath,
+ "Prompt list should contain memory path with trailing slash")
+ }
// Test 2: Validate artifact upload path (no trailing slash)
var artifactUploadBuilder strings.Builder
@@ -191,19 +194,26 @@ func TestRepoMemoryPromptPathTrailingSlash(t *testing.T) {
},
}
- var builder strings.Builder
- generateRepoMemoryPromptSection(&builder, config)
- output := builder.String()
+ section := buildRepoMemoryPromptSection(config)
+ require.NotNil(t, section, "Should have a prompt section")
+ assert.True(t, section.IsFile, "Should use template file")
expectedPath := fmt.Sprintf("/tmp/gh-aw/repo-memory/%s/", tt.memoryID)
- assert.Contains(t, output, expectedPath,
- "Prompt must show memory path with trailing slash")
-
- // Only check example paths for default memory (single memory with ID "default")
- // Other configs use generic example paths like /tmp/gh-aw/repo-memory/notes.md
- if tt.checkExamplePath && strings.Contains(output, "notes.md") {
- assert.Contains(t, output, fmt.Sprintf("%snotes.md", expectedPath),
- "Example paths for default memory should include memory-specific path")
+
+ if tt.memoryID == "default" {
+ // Single default memory uses GH_AW_MEMORY_DIR
+ assert.Equal(t, expectedPath, section.EnvVars["GH_AW_MEMORY_DIR"],
+ "Prompt must show memory path with trailing slash")
+
+ // Check example paths are memory-specific for default memory
+ if tt.checkExamplePath {
+ assert.Equal(t, repoMemoryPromptFile, section.Content,
+ "Default memory should use single memory template")
+ }
+ } else {
+ // Non-default single memory uses multi template with GH_AW_MEMORY_LIST
+ assert.Contains(t, section.EnvVars["GH_AW_MEMORY_LIST"], expectedPath,
+ "Prompt list must show memory path with trailing slash")
}
})
}
@@ -380,14 +390,16 @@ func TestRepoMemoryMultipleMemoriesPathConsistency(t *testing.T) {
}
// Test prompt generation
- var promptBuilder strings.Builder
- generateRepoMemoryPromptSection(&promptBuilder, config)
- promptOutput := promptBuilder.String()
+ section := buildRepoMemoryPromptSection(config)
+ require.NotNil(t, section, "Should have a prompt section")
+ assert.True(t, section.IsFile, "Should use template file")
+ assert.Equal(t, repoMemoryPromptMultiFile, section.Content, "Should use multi memory template")
- assert.Contains(t, promptOutput, "/tmp/gh-aw/repo-memory/session/",
- "Prompt should contain session memory path")
- assert.Contains(t, promptOutput, "/tmp/gh-aw/repo-memory/logs/",
- "Prompt should contain logs memory path")
+ memoryList := section.EnvVars["GH_AW_MEMORY_LIST"]
+ assert.Contains(t, memoryList, "/tmp/gh-aw/repo-memory/session/",
+ "Memory list should contain session memory path")
+ assert.Contains(t, memoryList, "/tmp/gh-aw/repo-memory/logs/",
+ "Memory list should contain logs memory path")
// Test artifact upload
var uploadBuilder strings.Builder
@@ -451,9 +463,10 @@ func TestRepoMemoryPathComponentIsolation(t *testing.T) {
RepoMemoryConfig: config,
}
- // Generate all outputs
- var promptBuilder strings.Builder
- generateRepoMemoryPromptSection(&promptBuilder, config)
+ // Generate prompt section EnvVars (memory ID "test" uses multi template since it's not "default")
+ section := buildRepoMemoryPromptSection(config)
+ require.NotNil(t, section, "Should have a prompt section")
+ memoryList := section.EnvVars["GH_AW_MEMORY_LIST"]
var uploadBuilder strings.Builder
generateRepoMemoryArtifactUpload(&uploadBuilder, data)
@@ -467,8 +480,8 @@ func TestRepoMemoryPathComponentIsolation(t *testing.T) {
require.NotNil(t, pushJob)
pushJobOutput := strings.Join(pushJob.Steps, "\n")
- // Combine all output
- allOutput := promptBuilder.String() + uploadBuilder.String() + cloneBuilder.String() + pushJobOutput
+ // Combine all output (using memory list from prompt section EnvVars)
+ allOutput := memoryList + uploadBuilder.String() + cloneBuilder.String() + pushJobOutput
// Verify consistent use of /tmp/gh-aw/repo-memory/test
expectedMemoryDir := "/tmp/gh-aw/repo-memory/test"
diff --git a/pkg/workflow/repo_memory_prompt.go b/pkg/workflow/repo_memory_prompt.go
index d3d6fb466f..39eec0793a 100644
--- a/pkg/workflow/repo_memory_prompt.go
+++ b/pkg/workflow/repo_memory_prompt.go
@@ -10,141 +10,124 @@ import (
var repoMemoryPromptLog = logger.New("workflow:repo_memory_prompt")
-// generateRepoMemoryPromptSection generates the repo memory notification section for prompts
-// when repo-memory is enabled, informing the agent about git-based persistent storage capabilities
-func generateRepoMemoryPromptSection(yaml *strings.Builder, config *RepoMemoryConfig) {
+// buildRepoMemoryPromptSection builds a PromptSection for repo memory instructions.
+// Returns a PromptSection that references a template file with substitutions, or nil if no memory is configured.
+func buildRepoMemoryPromptSection(config *RepoMemoryConfig) *PromptSection {
if config == nil || len(config.Memories) == 0 {
- return
+ return nil
}
- yaml.WriteString(" \n")
- yaml.WriteString(" \n")
- yaml.WriteString(" \n")
-
- // Check if there's only one memory with ID "default" to use singular form
+ // Check if there's only one memory with ID "default" to use singular template
if len(config.Memories) == 1 && config.Memories[0].ID == "default" {
- repoMemoryPromptLog.Printf("Generating single default repo memory prompt: branch=%s", config.Memories[0].BranchName)
- yaml.WriteString(" ## Repo Memory Available\n")
- yaml.WriteString(" \n")
memory := config.Memories[0]
memoryDir := fmt.Sprintf("/tmp/gh-aw/repo-memory/%s/", memory.ID)
+ repoMemoryPromptLog.Printf("Building single default repo memory prompt section: branch=%s", memory.BranchName)
+
+ // Build description text (with leading space if non-empty)
+ descriptionText := ""
if memory.Description != "" {
- fmt.Fprintf(yaml, " You have access to a persistent repo memory folder at `%s` where you can read and write files that are stored in a git branch. %s\n", memoryDir, memory.Description)
- } else {
- fmt.Fprintf(yaml, " You have access to a persistent repo memory folder at `%s` where you can read and write files that are stored in a git branch.\n", memoryDir)
+ descriptionText = " " + memory.Description
}
- yaml.WriteString(" \n")
- yaml.WriteString(" - **Read/Write Access**: You can freely read from and write to any files in this folder\n")
- fmt.Fprintf(yaml, " - **Git Branch Storage**: Files are stored in the `%s` branch", memory.BranchName)
+
+ // Build target repo text
+ targetRepoText := " of the current repository"
if memory.TargetRepo != "" {
- fmt.Fprintf(yaml, " of repository `%s`\n", memory.TargetRepo)
- } else {
- yaml.WriteString(" of the current repository\n")
+ targetRepoText = fmt.Sprintf(" of repository `%s`", memory.TargetRepo)
}
- yaml.WriteString(" - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes\n")
- yaml.WriteString(" - **Merge Strategy**: In case of conflicts, your changes (current version) win\n")
- yaml.WriteString(" - **Persistence**: Files persist across workflow runs via git branch storage\n")
- yaml.WriteString(" - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation.\n")
- // Add file constraints if specified
+ // Build constraints section
+ // The value is either "\n" (blank line only) or "\n\n**Constraints:**\n...\n"
+ // so that the template line __GH_AW_MEMORY_CONSTRAINTS__\nExamples... renders correctly.
+ constraintsText := "\n"
if len(memory.FileGlob) > 0 || memory.MaxFileSize > 0 || memory.MaxFileCount > 0 {
- yaml.WriteString(" \n")
- yaml.WriteString(" **Constraints:**\n")
+ var constraints strings.Builder
+ constraints.WriteString("\n\n**Constraints:**\n")
if len(memory.FileGlob) > 0 {
- fmt.Fprintf(yaml, " - **Allowed Files**: Only files matching patterns: %s\n", strings.Join(memory.FileGlob, ", "))
+ fmt.Fprintf(&constraints, "- **Allowed Files**: Only files matching patterns: %s\n", strings.Join(memory.FileGlob, ", "))
}
if memory.MaxFileSize > 0 {
- fmt.Fprintf(yaml, " - **Max File Size**: %d bytes (%.2f MB) per file\n", memory.MaxFileSize, float64(memory.MaxFileSize)/1048576.0)
+ fmt.Fprintf(&constraints, "- **Max File Size**: %d bytes (%.2f MB) per file\n", memory.MaxFileSize, float64(memory.MaxFileSize)/1048576.0)
}
if memory.MaxFileCount > 0 {
- fmt.Fprintf(yaml, " - **Max File Count**: %d files per commit\n", memory.MaxFileCount)
+ fmt.Fprintf(&constraints, "- **Max File Count**: %d files per commit\n", memory.MaxFileCount)
}
+ constraintsText = constraints.String()
}
- yaml.WriteString(" \n")
- yaml.WriteString(" Examples of what you can store:\n")
- fmt.Fprintf(yaml, " - `%snotes.md` - general notes and observations\n", memoryDir)
- fmt.Fprintf(yaml, " - `%snotes.txt` - plain text notes\n", memoryDir)
- fmt.Fprintf(yaml, " - `%sstate.json` - structured state data\n", memoryDir)
- fmt.Fprintf(yaml, " - `%shistory.jsonl` - activity history in JSON Lines format\n", memoryDir)
- fmt.Fprintf(yaml, " - `%sdata.csv` - tabular data\n", memoryDir)
- fmt.Fprintf(yaml, " - `%shistory/` - organized history files in subdirectories (with allowed file types)\n", memoryDir)
- yaml.WriteString(" \n")
- yaml.WriteString(" Feel free to create, read, update, and organize files in this folder as needed for your tasks, using only the allowed file types.\n")
- yaml.WriteString(" \n")
- } else {
- // Multiple memories or non-default single memory
- repoMemoryPromptLog.Printf("Generating multiple repo memory prompts: count=%d", len(config.Memories))
- yaml.WriteString(" ## Repo Memory Locations Available\n")
- yaml.WriteString(" \n")
- yaml.WriteString(" You have access to persistent repo memory folders where you can read and write files that are stored in git branches:\n")
- yaml.WriteString(" \n")
- for _, memory := range config.Memories {
- memoryDir := fmt.Sprintf("/tmp/gh-aw/repo-memory/%s/", memory.ID)
- fmt.Fprintf(yaml, " - **%s**: `%s`", memory.ID, memoryDir)
- if memory.Description != "" {
- fmt.Fprintf(yaml, " - %s", memory.Description)
- }
- fmt.Fprintf(yaml, " (branch: `%s`", memory.BranchName)
- if memory.TargetRepo != "" {
- fmt.Fprintf(yaml, " in `%s`", memory.TargetRepo)
- }
- yaml.WriteString(")\n")
+ return &PromptSection{
+ Content: repoMemoryPromptFile,
+ IsFile: true,
+ EnvVars: map[string]string{
+ "GH_AW_MEMORY_DIR": memoryDir,
+ "GH_AW_MEMORY_DESCRIPTION": descriptionText,
+ "GH_AW_MEMORY_BRANCH_NAME": memory.BranchName,
+ "GH_AW_MEMORY_TARGET_REPO": targetRepoText,
+ "GH_AW_MEMORY_CONSTRAINTS": constraintsText,
+ },
+ }
+ }
+
+ // Multiple memories or non-default single memory - use multi template
+ repoMemoryPromptLog.Printf("Building multiple repo memory prompt section: count=%d", len(config.Memories))
+
+ // Build memory list
+ var memoryList strings.Builder
+ for _, memory := range config.Memories {
+ memoryDir := fmt.Sprintf("/tmp/gh-aw/repo-memory/%s/", memory.ID)
+ fmt.Fprintf(&memoryList, "- **%s**: `%s`", memory.ID, memoryDir)
+ if memory.Description != "" {
+ fmt.Fprintf(&memoryList, " - %s", memory.Description)
}
- yaml.WriteString(" \n")
- yaml.WriteString(" - **Read/Write Access**: You can freely read from and write to any files in these folders\n")
- yaml.WriteString(" - **Git Branch Storage**: Each memory is stored in its own git branch\n")
- yaml.WriteString(" - **Automatic Push**: Changes are automatically committed and pushed after the workflow completes\n")
- yaml.WriteString(" - **Merge Strategy**: In case of conflicts, your changes (current version) win\n")
- yaml.WriteString(" - **Persistence**: Files persist across workflow runs via git branch storage\n")
- // Build allowed extensions text - check if all memories have the same extensions
- allowedExtsText := strings.Join(config.Memories[0].AllowedExtensions, "`, `")
- allSame := true
- for i := 1; i < len(config.Memories); i++ {
- if len(config.Memories[i].AllowedExtensions) != len(config.Memories[0].AllowedExtensions) {
+ fmt.Fprintf(&memoryList, " (branch: `%s`", memory.BranchName)
+ if memory.TargetRepo != "" {
+ fmt.Fprintf(&memoryList, " in `%s`", memory.TargetRepo)
+ }
+ memoryList.WriteString(")\n")
+ }
+
+ // Build allowed extensions text - check if all memories have the same extensions
+ allowedExtsText := strings.Join(config.Memories[0].AllowedExtensions, "`, `")
+ allSame := true
+ for i := 1; i < len(config.Memories); i++ {
+ if len(config.Memories[i].AllowedExtensions) != len(config.Memories[0].AllowedExtensions) {
+ allSame = false
+ break
+ }
+ for j, ext := range config.Memories[i].AllowedExtensions {
+ if ext != config.Memories[0].AllowedExtensions[j] {
allSame = false
break
}
- for j, ext := range config.Memories[i].AllowedExtensions {
- if ext != config.Memories[0].AllowedExtensions[j] {
- allSame = false
- break
- }
- }
- if !allSame {
- break
- }
}
-
- // If not all the same, build a union of all extensions
if !allSame {
- extensionSet := make(map[string]bool)
- for _, mem := range config.Memories {
- for _, ext := range mem.AllowedExtensions {
- extensionSet[ext] = true
- }
- }
- // Convert set to sorted slice for consistent output
- var allExtensions []string
- for ext := range extensionSet {
- allExtensions = append(allExtensions, ext)
+ break
+ }
+ }
+
+ // If not all the same, build a union of all extensions
+ if !allSame {
+ extensionSet := make(map[string]bool)
+ for _, mem := range config.Memories {
+ for _, ext := range mem.AllowedExtensions {
+ extensionSet[ext] = true
}
- sort.Strings(allExtensions)
- allowedExtsText = strings.Join(allExtensions, "`, `")
}
- fmt.Fprintf(yaml, " - **Allowed File Types**: Only the following file extensions are allowed: `%s`. Files with other extensions will be rejected during validation.\n", allowedExtsText)
- yaml.WriteString(" \n")
- yaml.WriteString(" Examples of what you can store:\n")
- memoryDir := "/tmp/gh-aw/repo-memory"
- fmt.Fprintf(yaml, " - `%s/notes.md` - general notes and observations\n", memoryDir)
- fmt.Fprintf(yaml, " - `%s/notes.txt` - plain text notes\n", memoryDir)
- fmt.Fprintf(yaml, " - `%s/state.json` - structured state data\n", memoryDir)
- fmt.Fprintf(yaml, " - `%s/history.jsonl` - activity history in JSON Lines format\n", memoryDir)
- fmt.Fprintf(yaml, " - `%s/data.csv` - tabular data\n", memoryDir)
- fmt.Fprintf(yaml, " - `%s/history/` - organized history files (with allowed file types)\n", memoryDir)
- yaml.WriteString(" \n")
- yaml.WriteString(" Feel free to create, read, update, and organize files in these folders as needed for your tasks, using only the allowed file types.\n")
- yaml.WriteString(" \n")
+ // Convert set to sorted slice for consistent output
+ var allExtensions []string
+ for ext := range extensionSet {
+ allExtensions = append(allExtensions, ext)
+ }
+ sort.Strings(allExtensions)
+ allowedExtsText = strings.Join(allExtensions, "`, `")
+ }
+
+ return &PromptSection{
+ Content: repoMemoryPromptMultiFile,
+ IsFile: true,
+ EnvVars: map[string]string{
+ "GH_AW_MEMORY_LIST": memoryList.String(),
+ "GH_AW_MEMORY_ALLOWED_EXTENSIONS": allowedExtsText,
+ },
}
}
diff --git a/pkg/workflow/repo_memory_test.go b/pkg/workflow/repo_memory_test.go
index 0fb91cce05..5007cf84cc 100644
--- a/pkg/workflow/repo_memory_test.go
+++ b/pkg/workflow/repo_memory_test.go
@@ -314,38 +314,22 @@ func TestRepoMemoryPromptGeneration(t *testing.T) {
},
}
- var builder strings.Builder
- generateRepoMemoryPromptSection(&builder, config)
+ section := buildRepoMemoryPromptSection(config)
- output := builder.String()
+ require.NotNil(t, section, "Expected non-nil prompt section")
+ assert.True(t, section.IsFile, "Should use template file")
+ assert.Equal(t, repoMemoryPromptFile, section.Content, "Should reference repo memory prompt file")
+ require.NotNil(t, section.EnvVars, "Should have environment variables")
- // Check for prompt header
- if !strings.Contains(output, "## Repo Memory Available") {
- t.Error("Expected repo memory header")
- }
+ // Check for prompt header key
+ assert.Equal(t, "/tmp/gh-aw/repo-memory/default/", section.EnvVars["GH_AW_MEMORY_DIR"], "Should have correct memory directory")
// Check for description
- if !strings.Contains(output, "Persistent memory for agent state") {
- t.Error("Expected custom description")
- }
+ assert.Equal(t, " Persistent memory for agent state", section.EnvVars["GH_AW_MEMORY_DESCRIPTION"], "Expected custom description with leading space")
// Check for key information
- if !strings.Contains(output, "Read/Write Access") {
- t.Error("Expected read/write access information")
- }
-
- if !strings.Contains(output, "Git Branch Storage") {
- t.Error("Expected git branch storage information")
- }
-
- if !strings.Contains(output, "Automatic Push") {
- t.Error("Expected automatic push information")
- }
-
- // Check for examples
- if !strings.Contains(output, "notes.md") {
- t.Error("Expected example file")
- }
+ assert.Equal(t, "memory/default", section.EnvVars["GH_AW_MEMORY_BRANCH_NAME"], "Should have correct branch name")
+ assert.Equal(t, " of the current repository", section.EnvVars["GH_AW_MEMORY_TARGET_REPO"], "Should default to current repository")
}
// TestRepoMemoryMaxFileSizeValidation tests max-file-size boundary validation
diff --git a/pkg/workflow/sh.go b/pkg/workflow/sh.go
index 768c5cebdc..bf337b6da6 100644
--- a/pkg/workflow/sh.go
+++ b/pkg/workflow/sh.go
@@ -20,6 +20,8 @@ const (
xpiaPromptFile = "xpia.md"
cacheMemoryPromptFile = "cache_memory_prompt.md"
cacheMemoryPromptMultiFile = "cache_memory_prompt_multi.md"
+ repoMemoryPromptFile = "repo_memory_prompt.md"
+ repoMemoryPromptMultiFile = "repo_memory_prompt_multi.md"
)
// GitHub context prompt is kept embedded because it contains GitHub Actions expressions
diff --git a/pkg/workflow/unified_prompt_creation_test.go b/pkg/workflow/unified_prompt_creation_test.go
index 5a6bebc0f8..943b6b3ddb 100644
--- a/pkg/workflow/unified_prompt_creation_test.go
+++ b/pkg/workflow/unified_prompt_creation_test.go
@@ -542,8 +542,7 @@ func TestGenerateUnifiedPromptCreationStep_CacheAndRepoMemory(t *testing.T) {
// Verify cache template file reference
assert.Contains(t, output, "cache_memory_prompt.md", "Should reference cache template file")
- assert.Contains(t, output, "Repo Memory Available", "Should have repo memory prompt")
- assert.Contains(t, output, "/tmp/gh-aw/repo-memory/", "Should reference repo memory directory")
+ assert.Contains(t, output, "repo_memory_prompt.md", "Should reference repo memory template file")
// Generate the substitution step separately to verify cache dir is in substitutions
var substYaml strings.Builder
@@ -552,11 +551,12 @@ func TestGenerateUnifiedPromptCreationStep_CacheAndRepoMemory(t *testing.T) {
}
substOutput := substYaml.String()
assert.Contains(t, substOutput, "GH_AW_CACHE_DIR: process.env.GH_AW_CACHE_DIR", "Should have cache dir in substitution")
+ assert.Contains(t, substOutput, "GH_AW_MEMORY_DIR: process.env.GH_AW_MEMORY_DIR", "Should have memory dir in substitution")
// Verify ordering within system tags
systemOpenPos := strings.Index(output, "")
cachePos := strings.Index(output, "cache_memory_prompt.md")
- repoPos := strings.Index(output, "Repo Memory Available")
+ repoPos := strings.Index(output, "repo_memory_prompt.md")
systemClosePos := strings.Index(output, "")
userPos := strings.Index(output, "# User Task")
@@ -642,7 +642,7 @@ func TestGenerateUnifiedPromptCreationStep_AllToolsCombined(t *testing.T) {
assert.Contains(t, output, "temp_folder_prompt.md", "Should have temp folder")
assert.Contains(t, output, "playwright_prompt.md", "Should have playwright")
assert.Contains(t, output, "cache_memory_prompt.md", "Should have cache memory template")
- assert.Contains(t, output, "Repo Memory Available", "Should have repo memory")
+ assert.Contains(t, output, "repo_memory_prompt.md", "Should have repo memory template file")
assert.Contains(t, output, "", "Should have safe outputs")
assert.Contains(t, output, "", "Should have GitHub context")
assert.Contains(t, output, "pr_context_prompt.md", "Should have PR context")
diff --git a/pkg/workflow/unified_prompt_step.go b/pkg/workflow/unified_prompt_step.go
index 0846eca269..9b3a0530c0 100644
--- a/pkg/workflow/unified_prompt_step.go
+++ b/pkg/workflow/unified_prompt_step.go
@@ -277,12 +277,10 @@ func (c *Compiler) collectPromptSections(data *WorkflowData) []PromptSection {
// 6. Repo memory instructions (if enabled)
if data.RepoMemoryConfig != nil && len(data.RepoMemoryConfig.Memories) > 0 {
unifiedPromptLog.Printf("Adding repo memory section: memories=%d", len(data.RepoMemoryConfig.Memories))
- var repoMemContent strings.Builder
- generateRepoMemoryPromptSection(&repoMemContent, data.RepoMemoryConfig)
- sections = append(sections, PromptSection{
- Content: repoMemContent.String(),
- IsFile: false,
- })
+ section := buildRepoMemoryPromptSection(data.RepoMemoryConfig)
+ if section != nil {
+ sections = append(sections, *section)
+ }
}
// 7. Safe outputs instructions (if enabled)
diff --git a/pkg/workflow/unified_prompt_step_test.go b/pkg/workflow/unified_prompt_step_test.go
index 0675bf25d5..0ca95ec5ab 100644
--- a/pkg/workflow/unified_prompt_step_test.go
+++ b/pkg/workflow/unified_prompt_step_test.go
@@ -51,7 +51,7 @@ func TestGenerateUnifiedPromptStep_AllSections(t *testing.T) {
assert.Contains(t, output, "temp_folder_prompt.md", "Should include temp folder instructions")
assert.Contains(t, output, "playwright_prompt.md", "Should include playwright instructions")
assert.Contains(t, output, "cache_memory_prompt.md", "Should include cache memory template file")
- assert.Contains(t, output, "Repo Memory Available", "Should include repo memory instructions")
+ assert.Contains(t, output, "repo_memory_prompt.md", "Should include repo memory template file")
assert.Contains(t, output, "", "Should include safe outputs instructions")
assert.Contains(t, output, "", "Should include GitHub context")
@@ -115,7 +115,7 @@ func TestGenerateUnifiedPromptStep_MinimalSections(t *testing.T) {
// Verify other sections are NOT included
assert.NotContains(t, output, "playwright_prompt.md", "Should not include playwright without tool")
assert.NotContains(t, output, "cache_memory_prompt.md", "Should not include cache memory template without config")
- assert.NotContains(t, output, "Repo Memory Available", "Should not include repo memory without config")
+ assert.NotContains(t, output, "repo_memory_prompt.md", "Should not include repo memory without config")
assert.NotContains(t, output, "", "Should not include safe outputs without config")
assert.NotContains(t, output, "", "Should not include GitHub context without tool")
}