Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/copilot/instructions/workflow-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ This guide helps you optimize agentic workflow execution efficiency, focusing on

```bash
# Analyze recent workflow runs
gh aw logs workflow-name -c 10
gh aw logs workflow-name -c 10 -o /tmp/gh-aw/agent/logs/

# Audit specific run for performance insights
gh aw audit <run-id>

# Download logs for analysis
gh aw logs --start-date -1w -o /tmp/gh-aw/perf/
gh aw logs --start-date -1w -o /tmp/gh-aw/agent/perf/
```

## Performance Targets
Expand All @@ -33,8 +33,8 @@ gh aw logs --start-date -1w -o /tmp/gh-aw/perf/
**Measurement**:
```bash
# Analyze token distribution in logs
gh aw logs workflow-name -c 1
grep -i "token" /tmp/gh-aw/logs/workflow-name/*.log
gh aw logs workflow-name -c 1 -o /tmp/gh-aw/agent/logs/
grep -R -i "token" /tmp/gh-aw/agent/logs/
```

**Optimization Strategy**:
Expand Down Expand Up @@ -72,10 +72,10 @@ Use the github tool to get full issue details with all fields.
**Measurement**:
```bash
# Count tool calls in logs
grep "tool_use" /tmp/gh-aw/logs/workflow/*.log | wc -l
grep -R "tool_use" /tmp/gh-aw/agent/logs/ | wc -l

# Identify repeated calls
grep "tool_use" /tmp/gh-aw/logs/workflow/*.log | sort | uniq -c | sort -rn
grep -R "tool_use" /tmp/gh-aw/agent/logs/ | sort | uniq -c | sort -rn
```

**Optimization Strategy**:
Expand Down Expand Up @@ -118,7 +118,7 @@ steps:
setup-env:
name: Setup Environment
run: |
mkdir -p /tmp/gh-aw/work
mkdir -p /tmp/gh-aw/agent/work
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
```
Expand Down Expand Up @@ -243,8 +243,8 @@ steps:
steps:
setup-dirs:
run: |
mkdir -p /tmp/gh-aw/work
mkdir -p /tmp/gh-aw/output
mkdir -p /tmp/gh-aw/agent/work
mkdir -p /tmp/gh-aw/agent/output
```

**Pre-install Tools** (if needed):
Expand Down
20 changes: 7 additions & 13 deletions .github/skills/jqschema/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ description: Infer JSON structure and types with jq-based schema discovery.
tools:
bash:
- "jq *"
- "/tmp/gh-aw/jqschema.sh"
- "./.github/skills/jqschema/jqschema.sh"
- "git"
steps:
- name: Setup jq utilities directory
run: |
mkdir -p /tmp/gh-aw
cp "$GITHUB_WORKSPACE/.github/skills/jqschema/jqschema.sh" /tmp/gh-aw/jqschema.sh
chmod +x /tmp/gh-aw/jqschema.sh
---

## jqschema - JSON Schema Discovery

Use `/tmp/gh-aw/jqschema.sh` to discover complex JSON structure.
Use `./.github/skills/jqschema/jqschema.sh` directly from the repository skill folder to discover complex JSON structure.

### Purpose

Expand All @@ -30,13 +24,13 @@ Generate a compact structural schema (keys + types) from JSON input. Use it when

```bash
# Analyze a file
cat data.json | /tmp/gh-aw/jqschema.sh
cat data.json | ./.github/skills/jqschema/jqschema.sh

# Analyze command output
echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | /tmp/gh-aw/jqschema.sh
echo '{"name": "test", "count": 42, "items": [{"id": 1}]}' | ./.github/skills/jqschema/jqschema.sh

# Analyze GitHub search results
gh api search/repositories?q=language:go | /tmp/gh-aw/jqschema.sh
gh api search/repositories?q=language:go | ./.github/skills/jqschema/jqschema.sh
```

### How It Works
Expand Down Expand Up @@ -77,7 +71,7 @@ The script transforms JSON data by:
```bash
# Step 1: Get schema with minimal data (fetch just 1 result)
# This helps understand the structure before requesting large datasets
echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | /tmp/gh-aw/jqschema.sh
echo '{}' | gh api search/repositories -f q="language:go" -f per_page=1 | ./.github/skills/jqschema/jqschema.sh

# Output shows the schema:
# {"incomplete_results":"boolean","items":[{...}],"total_count":"number"}
Expand All @@ -95,7 +89,7 @@ When using tools like `search_code`, `search_issues`, or `search_repositories`,
gh api search/code -f q="jq in:file language:bash" -f per_page=1 > /tmp/sample.json

# Generate schema to understand structure
cat /tmp/sample.json | /tmp/gh-aw/jqschema.sh
cat /tmp/sample.json | ./.github/skills/jqschema/jqschema.sh

# Now you know which fields exist and can use them in your analysis
```
4 changes: 2 additions & 2 deletions .github/workflows/ab-testing-advisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Show the concrete before/after diff.
- [ ] Add `experiments:` section to frontmatter
- [ ] Add conditional blocks to workflow prompt body using `{{#if experiments.<name> == "<variant>" }}` (value-comparison form — never use the internal `__GH_AW_EXPERIMENTS__` env-var syntax)
- [ ] Run `gh aw compile <workflow-name>` to regenerate lock file
- [ ] Monitor experiment artifact uploaded per run to `/tmp/gh-aw/experiments/state.json`
- [ ] Monitor experiment artifact uploaded per run to `/tmp/gh-aw/agent/experiments/state.json`
- [ ] After sufficient runs, analyze variant distribution via workflow run artifacts
- [ ] Document findings and promote winning variant

Expand Down Expand Up @@ -307,7 +307,7 @@ After completing the primary quest, include a **second issue** (sub-issue of the

Use the `field-presence-checker` agent with file paths `pkg/workflow/compiler_experiments.go` and `actions/setup/js/pick_experiment.cjs`, and field names `analysis_type`, `tags`, `notify`. Use the returned `present`/`evidence` results when deciding which fields are genuinely absent.

Then review what data is currently captured per experiment run (the artifact uploaded to `/tmp/gh-aw/experiments/state.json`) and consider what would be needed for a complete experiment analytics pipeline.
Then review what data is currently captured per experiment run (the artifact uploaded to `/tmp/gh-aw/agent/experiments/state.json`) and consider what would be needed for a complete experiment analytics pipeline.

Propose concrete improvements in the following areas:

Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/agentic-token-audit.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading