chore: apply 2026-06-04 ambient context optimizations#36992
Merged
pelikhan merged 2 commits intoJun 4, 2026
Conversation
…, serena fix, heading flatten Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize ambient context for daily workflows
chore: apply 2026-06-04 ambient context optimizations
Jun 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies “ambient context optimizations” to agentic workflows by switching selected workflows to tools.github.mode: gh-proxy, deduplicating repeated prompt/template content (Python dataviz setup, Serena activation prose, safe-output prose), and reducing heading density in long workflow prompts. These changes aim to shrink per-turn preambles and make workflows more maintainable without changing their intended behavior.
Changes:
- Enable
tools.github.mode: gh-proxy(and corresponding lockfile regeneration) to reduce GitHub MCP startup/tool-definition overhead. - Deduplicate / slim down shared prompt content (Python dataviz setup, Serena activation duplication, safe-output prose) and flatten heading density in analysis templates.
- Regenerate affected
.lock.ymlfiles to reflect prompt/template updates.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/terminal-stylist.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/smoke-copilot-arm.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/smoke-codex.lock.yml | Regenerated lock metadata/hashes and heredoc labels from ambient context optimization run. |
| .github/workflows/shared/python-dataviz.md | Removes duplicated seaborn setup lines from an example workflow in favor of a canonical reference. |
| .github/workflows/shared/mcp/serena-go.md | Removes duplicated Serena workspace/activation prose (relies on imported serena.md). |
| .github/workflows/org-health-report.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/linter-miner.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/daily-security-observability.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/daily-issues-report.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/daily-function-namer.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/daily-code-metrics.md | Enables gh-proxy, trims repeated dataviz boilerplate, and flattens headings/sections. |
| .github/workflows/daily-code-metrics.lock.yml | Switches prompt assembly to CLI-proxy prompt and adds CLI proxy sidecar wiring; removes GitHub MCP server registration. |
| .github/workflows/copilot-pr-nlp-analysis.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/copilot-agent-analysis.md | Enables gh-proxy, flattens heading density, and updates metric naming guidance in the narrative template. |
| .github/workflows/copilot-agent-analysis.lock.yml | Switches prompt assembly to CLI-proxy prompt and adds CLI proxy sidecar wiring; removes GitHub MCP server registration. |
| .github/workflows/cloclo.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/aw-failure-investigator.md | Removes duplicated safe-output prose about temporary ID format. |
| .github/workflows/aw-failure-investigator.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
| .github/workflows/archie.lock.yml | Regenerated lock metadata/hashes from ambient context optimization run. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 23/23 changed files
- Comments generated: 3
| # Set style | ||
| sns.set_style("whitegrid") | ||
| sns.set_palette("husl") | ||
| # Apply canonical chart setup (see Chart Generation Best Practices above) |
| # Set style | ||
| sns.set_style("whitegrid") | ||
| sns.set_palette("husl") | ||
| # Apply canonical chart setup (see python-dataviz.md Chart Generation Best Practices) |
Comment on lines
243
to
+244
| - Total PRs created today (`agent_prs_total`) | ||
| - Number merged/closed/open (`agent_prs_merged`) | ||
| - Number merged/closed/open (`agent_prs_merged`, `closed_prs`, `open_prs`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Daily Ambient Context Optimizer identified token waste across 4 workflows: repeated Python dataviz boilerplate (4× dup setup blocks), missing
gh-proxyon 2 workflows adding pre-auth preamble overhead, redundant safe-output prose in a 34-turn workflow, a Serena import collision doubling Workspace/Activation content, and excessive heading density (129h/975l, 75h/748l).Changes
gh-proxyadoptiontools.github.mode: gh-proxytodaily-code-metrics.mdandcopilot-agent-analysis.md— eliminates Docker MCP server startup and strips the GitHub tool-definition block from every turn's preambleDeduplicate Python dataviz setup
shared/python-dataviz.md: replaced the duplicatesns.set_style/sns.set_paletteblock in "Complete Example Workflow" with a canonical reference — "Chart Generation Best Practices" is the single source of truthdaily-code-metrics.md: dropped redundant Styling/Color Palette bullets from "Chart Quality Standards" and the duplicate setup lines from the Python Script Structure template (already covered by the imported shared file)Strip safe-output re-documentation
aw-failure-investigator.md: removed(temporary ID format aw_ + 3-8 alphanumeric characters)from step 4 — the AWF preamble is authoritative; at 34 turns/run this duplication cost ~34× per byteFix Serena import collision
shared/mcp/serena-go.md: removed the Workspace/Memory/Project Activation block that duplicated whatserena.md(already imported) provides; retained Go-specific Analysis Constraints onlyFlatten heading density
copilot-agent-analysis.md: merged §2.1 (3 lines) and §2.2 (4 lines) into Phase 2 intro; removed duplicate#### 4.3section; converted#### Performance Metrics / Issues / Open PRs / Key Insightsinside the discussion template to bold labelsdaily-code-metrics.md: folded the 3-line "Most Active Source Files" stub into the Code Churn section; merged the single-line### Quality Score+### Component Breakdownpair into one section