Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-08-31 #57502

Description

@github-actions

Executive Summary

  • Runs sampled: 4 (across 4 distinct workflows, last ~1hr window due to MCP count limits)
  • Median first-request size: 20,786 chars | P95: 28,538 chars
  • No canonical sandbox/firewall/logs/api-proxy-logs/event-logs.jsonl or session events.jsonl was present for sampled runs; prompt.txt was used as fallback request source per extraction rules.
  • Highest-level conclusion: largest bloat driver is duplicated inline JSON output-schema templates embedded directly in workflow markdown (Deep Report), plus missing gh-proxy/explicit MCP usage in one sampled workflow (Deep Report has cli-proxy: true but no tools.github.mode: gh-proxy).

Highest-Leverage Changes

  1. Move Deep Report's duplicated inline JSON schema blocks (issue/discussion output templates) into a shared ## skill: block, loaded on demand instead of repeated inline in every prompt.
  2. Add tools.github.mode: gh-proxy to deep-report.md (already has cli-proxy: true) to enable gh-proxy read caching and reduce raw gh shell verbosity.
  3. Audit daily-code-metrics.md (23,084 chars, 30 headings) for consolidating the 3 near-duplicate "Summary / Key Visualizations / Top Recommendations" report-format sections (lines ~239-308) into one parameterized template.
  4. Reduce redundant **X items found** and **Key metrics today** placeholder repetition patterns across sampled workflows by centralizing format strings in a skill.

CI-Validation Checklist for Implementing Agents

Any agent implementing workflow-file recommendations must complete every item below before opening a PR:

  • Run make recompile for every modified .github/workflows/*.md file — zero compilation errors required
  • Confirm no target workflow file is reduced by more than 40% of its current character count
  • Run make agent-report-progress before the final commit and confirm it passes
  • Check the blocked_files list in /tmp/gh-aw/ambient-context/closed-pr-targets.jsondo not re-attempt changes to any file that appears in a closed ambient-context optimization PR from the last 14 days
  • Include a smoke-test result or dry-run output in the PR description for every changed workflow spec
  • Document all generated .lock.yml changes in the PR body
  • Do not submit as a draft PR

Key Metrics

Metric Value
Sampled runs 4
Distinct workflows 4
Median chars 20,786
P95 chars 28,538
Largest sampled request Deep Report — 29,501 chars
Merged optimizer PRs (7d) 4
Closed optimizer PRs (7d) 0
Optimizer PR close-rate (7d) 0% (insufficient data, <3 settled)
WSRF (audited runs) Deep Report: 1.32
Per-Run First-Request Metrics
Run Workflow Chars Lines Headings Inline Skills Dup Line Ratio WSRF
§33425135973 Deep Report 29,501 514 42 0 0.0104 1.32
§33425686994 Daily Code Metrics 23,084 383 30 0 0.037 2.00
§33426523864 MCP Inspector Agent 18,488 305 18 0 0.0 1.0046
33420892409 Copilot Opt 16,250 245 17 0 0.0 1.0059
Repeated Ambient Context Signals
  • Deep Report: duplicate "createdAt"/"updatedAt" ISO-timestamp schema lines appear 2x each within inline JSON output templates (issue vs. discussion body schemas) — candidate for shared skill extraction.
  • Daily Code Metrics: **Key metrics today**: LOC | Quality score | Test ratio | Active files placeholder repeated 2x across near-duplicate "Summary" sections for different report variants.
  • Deep Report + others: **X items found** — [brief description] placeholder pattern appears 3x total across sampled requests, indicating a shared report-item template that could be centralized.
  • No inline ## agent: or ## linter: blocks detected in any of the 4 sampled requests — inline-agent bloat is not currently a driver for this sample.
Deterministic Analysis Output
  • Script: /tmp/gh-aw/ambient-context/analyze_requests.py (stdlib only), outputs request-analysis.json / .md.
  • Longest preamble section dominates all 4 requests (16,212–29,433 chars), consistent with large inline instruction bodies rather than fragmented headings.
  • Deep Report has the highest code-fence count (16) and only <details> block among samples, and the highest duplicate-paragraph ratio isn't present there (0.011) but Daily Code Metrics has the highest dup ratios (line 0.037, paragraph 0.024) of the sample — consistent with its 3 near-duplicate report-format sections.
  • imported_skill_ref_count (SKILL.md references) was 0 for all 4 sampled requests — none of these workflows currently leverage .github/skills/*/SKILL.md fusion for their large report templates, despite Deep Report and Daily Code Metrics both embedding large inline JSON/markdown templates that are natural skill candidates.

Recommendations by Category

Workflow Markdown

  1. deep-report.md — Enable tools.github.mode: gh-proxy (currently only cli-proxy: true is set). Evidence: frontmatter lacks mode: gh-proxy while mcp-inspector.md and copilot-opt.md both already set it. Expected impact: medium, likely safe immediately (config addition only, no content removal).
  2. daily-code-metrics.md — Consolidate the 3 parallel "Summary / Key Visualizations / Top Recommendations" report-format sections (lines ~239–308, ~2,300+ chars combined) into one parameterized template referenced via variant flag. Evidence: dup line ratio 0.037, dup paragraph ratio 0.024 — highest in sample. Expected impact: medium, needs manual review (report format is user-facing).

Skills

  1. deep-report.md — Extract the duplicated inline JSON output-schema blocks (issue/discussion body templates with repeated createdAt/updatedAt fields, ~450+ chars duplicated) into a new .github/skills/deep-report-output-schema/SKILL.md, loaded via ## skill: reference instead of inline duplication. Evidence: repeated fragment detector found createdAt/updatedAt pairs 2x each in the same request. Expected impact: high, needs manual review (schema correctness matters for downstream safe-outputs parsing).
  2. All sampled workflows — None currently reference SKILL.md for their large inline report/output templates (imported_skill_ref_count: 0 across all 4 samples). Move large output-template bodies (issue/discussion formats) into on-demand skills per rule #6 of the analysis guidance. Expected impact: medium, needs manual review.

Agents

  1. No inline-agent bloat found in this sample (inline_agent_count: 0 across all 4 requests) — no agent-simplification recommendation warranted from this data. Expected impact: low / not applicable this cycle.

References

Generated by 🌫️ Daily Ambient Context Optimizer · copilot · auto · 64.2 AIC · ⌖ 12.7 AIC · ⊞ 11.7K ·

  • expires on Sep 7, 2026, 12:02 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions