feat: reduce ambient context token usage across 4 workflows#46684
Conversation
…kflows - daily-cache-strategy-analyzer.md: add gh-proxy + cli-proxy tools, consolidate Phase 2 sub-sections 2.1/2.2/2.3 into single detection block (~854 char reduction) - changeset.md: add github.mode: gh-proxy to complete proxy coverage - pr-sous-chef.md: remove redundant rules 10-11 from token efficiency rules, trim Required nudges section by removing duplicate shell examples (~3031 char reduction) - agent-persona-explorer.md: deduplicate Phase 3 batch/per-scenario assessment templates (~905 char reduction) - Recompile all 258 workflows (0 errors) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Workflow token optimization (removes redundant instructions, adds proxy config). Draft. Low urgency; can be batched with similar workflow-chore PRs.
|
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
Pull request overview
Reduces ambient prompt context across four agentic workflows while adding proxy declarations for GitHub access.
Changes:
- Consolidates repeated workflow instructions and examples.
- Adds
gh-proxyconfiguration. - Regenerates workflow lock files.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr-sous-chef.md |
Condenses nudge and safe-output guidance. |
.github/workflows/pr-sous-chef.lock.yml |
Updates generated body metadata. |
.github/workflows/daily-cache-strategy-analyzer.md |
Consolidates cache detection and declares proxies. |
.github/workflows/daily-cache-strategy-analyzer.lock.yml |
Updates generated metadata hashes. |
.github/workflows/changeset.md |
Declares GitHub proxy mode. |
.github/workflows/changeset.lock.yml |
Regenerates CLI-proxy runtime configuration. |
.github/workflows/agent-persona-explorer.md |
Deduplicates assessment criteria. |
.github/workflows/agent-persona-explorer.lock.yml |
Updates generated body metadata. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/8 changed files
- Comments generated: 4
- Review effort level: Medium
| safeoutputs update_pull_request --pull_request_number 12345 --update_branch true --body "<!-- pr-sous-chef branch update -->" --operation append | ||
| ``` | ||
| - If `mergeStateStatus` is `CONFLICTING`, **skip this step entirely**. | ||
| - Otherwise, attempt `update_pull_request` with `update_branch: true` and a minimal append body marker including `pr-sous-chef` and the run URL. |
| - Uses a volatile cache key with `${{ github.run_id }}` **and no restore-key fallbacks** (guaranteed cold start every run) | ||
| > **Note — "last one wins" pattern**: `<prefix>-${{ github.run_id }}` + restore key `<prefix>-` is valid. Only flag `run_id` keys as misconfigured when there are **no restore-key fallbacks**. | ||
| - Never writes to `/tmp/gh-aw/cache-memory/` (tool does nothing useful) | ||
| - Reads stale data without checking timestamps |
| cli-proxy: true | ||
| github: | ||
| mode: gh-proxy |
| github: | ||
| mode: gh-proxy |
…xt-daily-optimizer # Conflicts: # .github/workflows/agent-persona-explorer.lock.yml # .github/workflows/changeset.lock.yml # .github/workflows/daily-cache-strategy-analyzer.lock.yml # .github/workflows/pr-sous-chef.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Resolved in d2111ee. All four conflicts were in auto-generated |
…ontext optimization (#46684) Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
Daily Ambient Context Optimizer flagged high structural fragmentation and missing proxy config across four workflows, with median first-request size of 22K chars and P95 at 24K.
Changes
daily-cache-strategy-analyzer.mdgh-proxy+cli-proxytotools:— both were absent, leaving GitHub API and CLI calls on the slower unauthenticated path## Phase 2: Detect Cache Issuesblock; removes duplicate bash loop and table template (~854 chars saved)changeset.mdgithub: { mode: gh-proxy }—cli-proxy: truewas set but GitHub API calls were unoptimizedpr-sous-chef.md## Token efficiency rules— both restate the system-level safe-output terminal guarantee already injected at runtime## Required nudgesshell examples: consolidate the twoadd_commentexamples into one block, remove the standaloneupdate_pull_request/resolve_pull_request_review_thread/dismiss_pull_request_reviewexamples (format is established in the remaining block); all constraints preserved (~3,031 chars saved)agent-persona-explorer.md{{#if batch}}/{{else}}branches — both branches were repeating the identical 5-question checklist and quality-score structure (~905 chars saved)Total reduction: ~4,790 chars across 4 workflows. All 258 workflows recompile cleanly (0 errors).