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
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
- name: Set up gh-aw CLI
uses: github/gh-aw-actions/setup-cli@f8495a686e66770ae977f82732f34d7340ee42a4 # v0.71.4
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
version: v0.71.4
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile workflows
run: gh aw compile --dir workflows
Expand All @@ -27,9 +28,17 @@ jobs:
- name: Set up gh-aw CLI
uses: github/gh-aw-actions/setup-cli@f8495a686e66770ae977f82732f34d7340ee42a4 # v0.71.4
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
version: v0.71.4
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Initialize target repository
run: |
TARGET_REPO=$(mktemp -d)
echo "TARGET_REPO=$TARGET_REPO" >> "$GITHUB_ENV"
git init "$TARGET_REPO"

- name: Add workflows
working-directory: ${{ env.TARGET_REPO }}
run: gh aw add githubnext/agentic-ops/copilot-token-audit githubnext/agentic-ops/copilot-token-optimizer
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 6 additions & 4 deletions workflows/copilot-token-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ steps:
echo "❌ No log data downloaded (exit code $LOGS_EXIT)"
echo '{"runs":[],"summary":{}}' > /tmp/gh-aw/token-audit/copilot-logs.json
fi
safe-outputs:
create-issue:
close-older-issues: true
expires: 1w
labels: [agentic-workflows, agentic-ops]
title-prefix: "[aw-ops] "
timeout-minutes: 25
imports:
- uses: shared/daily-audit-base.md
with:
title-prefix: "[copilot-token-audit] "
- uses: shared/mcp/gh-aw.md
- shared/python-dataviz.md
---

Expand Down
29 changes: 0 additions & 29 deletions workflows/shared/daily-audit-base.md

This file was deleted.

65 changes: 65 additions & 0 deletions workflows/shared/reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
# Reporting Shared Component
# Provides common issue-reporting conventions for agentic workflows.
#
# Usage:
# imports:
# - shared/reporting.md
#
# This import provides:
# - Standard formatting guidelines for issues and discussions
# - Common markdown templates for tables, summaries, and recommendations

safe-outputs:
create-issue:
close-older-issues: true
expires: 7d
---

# Reporting Guidelines

Use the following conventions when generating issues, discussions, or step summaries.

## Issue Structure

Every generated issue should include:

1. **Executive Summary** — two-to-three sentence overview of findings.
2. **Data Table** — key metrics in a compact markdown table.
3. **Recommendations** — ranked list with estimated impact and concrete action.
4. **Caveats** — sampling limits, missing data, or edge cases that affect confidence.

Use `<details>` blocks for long supporting tables to keep the top-level view concise.

## Markdown Conventions

- Use `**bold**` for metric names and important values.
- Format large numbers with commas (e.g., `1,234,567`).
- Format costs as `$X.XX` (two decimal places).
- Use emoji sparingly: ✅ success, ⚠️ warning, ❌ failure, 📊 data, 💡 insight.
- Link to relevant runs, PRs, or issues where possible.

## Table Template

```markdown
| Metric | Value | Notes |
|---|---|---|
| Total runs | N | Last N days |
| Total tokens | N | Formatted with commas |
| Total cost | $X.XX | USD |
| Avg tokens/run | N | |
```

## Recommendations Template

```markdown
### Recommendations

1. **[Title]** — estimated savings: ~N tokens/run
- **Action**: ...
- **Evidence**: ...

2. **[Title]** — estimated savings: ~N tokens/run
- **Action**: ...
- **Evidence**: ...
```
Loading