[ambient-context] Daily Ambient Context Optimizer - 2026-08-25

Daily Code Metrics and Trend Tracking Agent · issue · closed

Filter2mode:review mode:live
All recorded Export JSON
github-actions[bot]

published Aug 25, 2026, 8:10 PM · updated Aug 26, 2026, 8:32 PM

Executive Summary

  • Sampled 4 completed runs across 4 distinct workflows from the last ~1h of activity (only 10 runs total were available in the 24h window before the count limit truncated collection; no failed runs were eligible).
  • No sandbox/firewall/logs/api-proxy-logs/event-logs.jsonl (or legacy events.jsonl) or sandbox/agent/logs/copilot-session-state/*/events.jsonl artifacts existed for any sampled run — all first-request text was extracted from aw-prompts/prompt.txt as a fallback, per the extraction rules.
  • Median first-request size: 15,337 chars; P95: 23,008 chars.
  • Largest sampled request: Daily Code Metrics and Trend Tracking Agent (23,008 chars) — driven by a "Report Format" section that repeats near-identical Summary/Visualization/Recommendation templates 3×.
  • Two runs were audited: [aw] Failure Investigator (6h) (WSRF 1.66) and Daily Code Metrics and Trend Tracking Agent (WSRF 1.99) — neither shows extreme context-rebuild pressure, so no urgent per-turn-resend fix is indicated this cycle.
  • Auto-pause check: total_settled_7d = 2 (< 3), so auto_pause is not triggered; normal recommendation cap (3–7) applies. No blocked files from the deduplication guard.

Highest-Leverage Changes

  1. Move the repeated Summary/Visualization/Recommendation report templates in daily-code-metrics.md into a ## skill: block so they load once rather than being duplicated 3× inline.
  2. Enable tools.cli-proxy: true for daily-go-test-parallelizer.md, which currently has no gh-proxy/cli-proxy declarations.
  3. Trim/deduplicate the "Report Format" section structure in daily-code-metrics.md (currently ~23K chars, largest sampled request) to cut repeated boilerplate.
  4. Continue monitoring WSRF on aw-failure-investigator.md and daily-code-metrics.md (both audited, WSRF ~1.7–2.0) — not urgent this cycle but worth a follow-up if it trends upward.

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.json (written by Step 4) — do 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 15,337
P95 chars 23,008
Largest sampled request 23,008 (daily-code-metrics)
Merged optimizer PRs (7d) 2
Closed optimizer PRs (7d) 0
Optimizer PR close-rate (7d) n/a (< 3 settled)
WSRF (audited runs) 1.66 (failure-investigator), 1.99 (daily-code-metrics)
Per-Run First-Request Metrics
Run Workflow Chars Headings Dup Line Ratio Details Blocks WSRF
32884495703 Daily Code Metrics and Trend Tracking Agent 23,008 ~25 0.037 2 1.99
32885000911 Daily Go Test Parallelizer 15,845 0.0 0 n/a
32886446455 Daily Safe Output Integrator 14,828 0.0 1 n/a
32886956255 [aw] Failure Investigator (6h) 14,306 0.0 0 1.66
Repeated Ambient Context Signals
  • **X items found** — [brief description] template repeated 3× within daily-code-metrics.md's prompt.
  • **Key metrics today**: LOC: X,XXX | Quality score: ... line repeated 2×.
  • ### 📊 Key Visualizations heading and its accompanying ![Quality Score](URL_FROM_UPLOAD_ASSET) / ![Historical Trends](URL_FROM_UPLOAD_ASSET) image placeholders each repeated 2×, indicating the same output-template scaffold is duplicated for multiple report variants inline rather than parameterized once.
  • No cross-workflow repeated fragments were found among the other 3 sampled workflows — bloat is localized to the code-metrics workflow's Report Format section.
Deterministic Analysis Output
  • Script: /tmp/gh-aw/ambient-context/analyze_requests.py (stdlib only), outputs request-analysis.json / .md.
  • daily-code-metrics.md's prompt has the largest "section by heading" span at ~2,333 chars for "## Metrics to Collect" and ~1,209 for "## Data Storage", plus multiple ~700–1,000 char sub-sections under "Report Format" (Summary/Visualizations/Recommendations ×3 report types).
  • aw-failure-investigator.md and daily-safe-output-integrator.md prompts showed 0.0 duplicate-line/paragraph ratios — largely non-repetitive, single-purpose framing.
  • No inline ## agent:, ## linter:, or ## skill: blocks were detected in any of the 4 sampled prompts (imported_skill_ref_count = 0 for all), meaning none of the sampled workflows currently benefit from on-demand skill loading — all instructional content is inlined in the main prompt body.

Recommendations by Category

Workflow Markdown

  1. daily-code-metrics.md — category: workflow-md, impact: medium, safe: needs manual review.
    Evidence: prompt is the largest sampled request (23,008 chars); "Report Format" section (lines ~229–308) repeats near-identical Summary/Visualization/Recommendation scaffolding for 3 report variants, contributing the top duplicate-fragment hits in the deterministic analysis.
    Why: consolidating the 3 near-identical templates into one parameterized structure (or moving to a shared skill block) removes repeated boilerplate without losing report variety guidance. File is 15,388 chars source — a full move of the Report Format templates (~2–3K chars) stays well under the 40% reduction guard.

  2. daily-go-test-parallelizer.md — category: workflow-md, impact: low, safe: immediate.
    Evidence: file has 0 gh-proxy/cli-proxy mentions, unlike the other 3 sampled workflows (2 each).
    Why: enabling tools.github.mode: gh-proxy and tools.cli-proxy: true moves GitHub/CLI operations off ambient inline instructions and onto deterministic proxied calls, in line with repo-wide proxy-readiness guidance. No raw gh aw shell instructions were found in this file to rewrite.

Skills

  1. daily-code-metrics.md report templates → skill — category: skills, impact: medium, safe: needs manual review.
    Evidence: imported_skill_ref_count = 0 across all 4 sampled prompts; the repeated Summary/Visualization/Recommendation blocks are large inline output templates currently embedded directly in the prompt body.
    Why: moving these templates into a ## skill: block would load them on demand rather than unconditionally inflating every run's first request, matching the "output templates → skills" pattern called out in the analysis rules.

Agents

No inline agent bloat was observed in this sample — none of the 4 sampled prompts contained ## agent: blocks, so no agent-simplification recommendation is warranted this cycle.

References

Generated by 🌫️ Daily Ambient Context Optimizer · copilot · auto · 63.1 AIC · ⌖ 10.7 AIC · ⊞ 11.8K ·

  • expires on Sep 1, 2026, 12:10 PM UTC-08:00