-
Notifications
You must be signed in to change notification settings - Fork 204
Description
Skill Overview
Extract common repo-memory configuration patterns into a reusable shared component. Currently, 21 workflows use repo-memory for persistent storage with similar configuration patterns, creating duplication and inconsistency in memory branch naming, file size limits, and file patterns.
Current Usage
This configuration pattern appears in the following workflows:
-
pr-triage-agent.md(memory/pr-triage) - PR triage state -
copilot-agent-analysis.md(memory/copilot-agent-analysis) - Agent metrics -
audit-workflows.md(memory/audit-workflows) - Audit history -
copilot-cli-deep-research.md(memory/copilot-cli-research) - Research notes (200KB) -
copilot-pr-nlp-analysis.md(memory/nlp-analysis) - NLP results -
copilot-pr-prompt-analysis.md(memory/prompt-analysis) - Prompt patterns -
daily-code-metrics.md(branch-prefix: daily) - Metrics history -
agent-performance-analyzer.md(memory/meta-orchestrators) - Performance data -
metrics-collector.md(likely uses memory/) - Metrics collection -
portfolio-analyst.md(likely uses memory/) - Portfolio state -
prompt-clustering-analysis.md(likely uses memory/) - Clustering results - + 10 more workflows with repo-memory
Common Configuration Pattern
Standard Pattern (15-25 lines per workflow):
tools:
repo-memory:
branch-name: memory/[workflow-name]
description: "Historical [workflow type] data"
file-glob: ["*.json", "*.jsonl", "*.csv", "*.md"]
max-file-size: 102400 # 100KBVariations Found:
- Large files: Some use
max-file-size: 204800(200KB) for research workflows - Branch patterns: Most use
memory/[name], one usesbranch-prefix: daily - File patterns: Most use
["*.json", "*.jsonl", "*.csv", "*.md"] - Descriptions: Vary but follow "Historical [type] data" pattern
Proposed Shared Component
File: .github/workflows/shared/repo-memory-standard.md
Configuration:
---
# Standard Repo-Memory Configuration
# Provides consistent persistent storage for workflow state and history
tools:
repo-memory:
branch-name: memory/\$\{WORKFLOW_ID}
description: "Historical workflow data and state"
file-glob: ["*.json", "*.jsonl", "*.csv", "*.md"]
max-file-size: 102400 # 100KB
---
# Standard Repo-Memory Configuration
This shared component provides standardized configuration for workflows that need persistent storage across runs.
### Features
- **Consistent branch naming**: `memory/[workflow-name]` pattern
- **Standard file types**: JSON, JSONL, CSV, Markdown
- **Safe file size**: 100KB limit (prevents memory bloat)
- **Organized storage**: All memory in `memory/*` branches
### Usage
Import this component in workflows that need persistent state:
````yaml
imports:
- shared/repo-memory-standard.mdMemory will be available at: /tmp/gh-aw/repo-memory/default/
Customization Options
For larger files (research, analysis):
imports:
- shared/repo-memory-standard.md
tools:
repo-memory:
max-file-size: 204800 # Override to 200KBFor specific file patterns:
imports:
- shared/repo-memory-standard.md
tools:
repo-memory:
file-glob: ["*.json", "*.jsonl"] # Only JSON filesFor custom branch naming:
imports:
- shared/repo-memory-standard.md
tools:
repo-memory:
branch-name: memory/custom-name # Override branchMemory Access
Memory is mounted at /tmp/gh-aw/repo-memory/default/:
# Read historical data
cat /tmp/gh-aw/repo-memory/default/history.jsonl
# Write new data
echo '{"date": "2024-01-15", "metrics": {...}}' >> /tmp/gh-aw/repo-memory/default/history.jsonl
# List available files
ls -lh /tmp/gh-aw/repo-memory/default/Best Practices
- Use JSONL for append-only logs: Efficient for historical data
- Clean up old data: Delete files older than 30 days in memory branches
- Version your data format: Include schema version in JSON files
- Document memory structure: Add README.md in memory branches
**Usage Example**:
````yaml
# pr-triage-agent.md (BEFORE)
---
description: PR triage automation
tools:
github:
lockdown: true
toolsets: [pull_requests, repos, issues, labels]
repo-memory:
branch-name: memory/pr-triage
file-glob: "**"
max-file-size: 102400 # 100KB
imports:
- shared/mood.md
---
# AFTER (saves 18 lines)
---
description: PR triage automation
tools:
github:
lockdown: true
toolsets: [pull_requests, repos, issues, labels]
imports:
- shared/repo-memory-standard.md
- shared/mood.md
---
Impact
- Workflows affected: 21 workflows
- Lines saved: ~20 lines per workflow × 21 = ~420 lines
- Consistency benefit: Standardizes memory branch naming across repository
- Maintenance benefit: Update file size limits or patterns in one place
- Discoverability: Makes it easier to find where workflows store persistent data
- Documentation benefit: Centralized memory usage documentation
Implementation Plan
- Create shared component at
.github/workflows/shared/repo-memory-standard.md - Document memory branch naming convention in component
- Test with 3 sample workflows (pr-triage-agent, copilot-agent-analysis, audit-workflows)
- Validate memory persistence across workflow runs
- Create variants if needed (e.g.,
repo-memory-large.mdfor 200KB limit) - Update remaining 18 workflows to use shared component
- Add memory branch discovery documentation to AGENTS.md
- Consider adding memory branch cleanup workflow
Memory Branch Organization
After implementation, all workflow memory will follow consistent pattern:
memory/
├── pr-triage/ # PR triage agent state
├── copilot-agent-analysis/ # Agent performance data
├── audit-workflows/ # Audit history
├── copilot-cli-research/ # Research notes (200KB limit)
├── nlp-analysis/ # NLP analysis results
└── [workflow-name]/ # Future workflows
Related Analysis
This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-15.
Analysis findings:
- 154 total workflows analyzed
- 21 workflows use repo-memory (14%)
- Inconsistent branch naming makes discovery difficult
- File size limits vary (100KB, 200KB)
- Potential to save ~420 lines of configuration
- Improves memory organization and discoverability
Generated by Workflow Skill Extractor
- expires on Feb 17, 2026, 4:20 PM UTC