Skip to content

chore: apply 2026-06-04 ambient context optimizations#36992

Merged
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer-another-one
Jun 4, 2026
Merged

chore: apply 2026-06-04 ambient context optimizations#36992
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 4, 2026

The Daily Ambient Context Optimizer identified token waste across 4 workflows: repeated Python dataviz boilerplate (4× dup setup blocks), missing gh-proxy on 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-proxy adoption

  • Added tools.github.mode: gh-proxy to daily-code-metrics.md and copilot-agent-analysis.md — eliminates Docker MCP server startup and strips the GitHub tool-definition block from every turn's preamble

Deduplicate Python dataviz setup

  • shared/python-dataviz.md: replaced the duplicate sns.set_style/sns.set_palette block in "Complete Example Workflow" with a canonical reference — "Chart Generation Best Practices" is the single source of truth
  • daily-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 byte

Fix Serena import collision

  • shared/mcp/serena-go.md: removed the Workspace/Memory/Project Activation block that duplicated what serena.md (already imported) provides; retained Go-specific Analysis Constraints only

Flatten heading density

  • copilot-agent-analysis.md: merged §2.1 (3 lines) and §2.2 (4 lines) into Phase 2 intro; removed duplicate #### 4.3 section; converted #### Performance Metrics / Issues / Open PRs / Key Insights inside the discussion template to bold labels
  • daily-code-metrics.md: folded the 3-line "Most Active Source Files" stub into the Code Churn section; merged the single-line ### Quality Score + ### Component Breakdown pair into one section

…, 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
Copilot AI requested a review from pelikhan June 4, 2026 21:08
@pelikhan pelikhan marked this pull request as ready for review June 4, 2026 22:33
Copilot AI review requested due to automatic review settings June 4, 2026 22:33
@pelikhan pelikhan merged commit 4608d94 into main Jun 4, 2026
@pelikhan pelikhan deleted the copilot/daily-ambient-context-optimizer-another-one branch June 4, 2026 22:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml files 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`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ambient-context] Daily Ambient Context Optimizer - 2026-06-04

3 participants