Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-07-09 #44618

Description

@github-actions

Executive Summary

  • 4 runs sampled across 4 distinct workflows (July 9, 2026)
  • Median first-request size: 13,467 chars; P95: 19,183 chars
  • System boilerplate dominates: 49–70% of every prompt is framework-injected (<safe-outputs> 3,481 chars, <mcp-clis> ~1,083 chars) — not reducible via workflow .md changes
  • Highest-cost workflow: Daily Code Metrics (AIC=236.84, 19,183 chars, 28 headings, 4.3% dup-line ratio)
  • Top opportunity: condense verbose prose sections in daily-code-metrics.md for est. ~1,800 chars savings

Highest-Leverage Changes

  1. Condense daily-code-metrics.md verbose data sections## Metrics to Collect (984 chars), ## Data Storage (789 chars), and # Prune history.jsonl (702 chars) can be rewritten as compact tables/bullets. Est. reduction: ~1,800 chars (~9% of compiled prompt).
  2. Trim shared/trends.md chart-style overlap — 1,530 chars compiled into Daily Code Metrics; prose duplicates shared/python-dataviz.md. Reduce to chart-type list only. Est. reduction: ~700–900 chars (within 40% guard).
  3. Compress pr-code-quality-reviewer.md step prose — Steps 1–5 total 5,138 chars; Steps 1 and 4 alone are 2,880 chars of multi-paragraph prose that can be condensed to tight bullets. Est. reduction: ~900–1,200 chars.
  4. Move Python path examples to pre-agent steps in daily-code-metrics.md### Python Script (529 chars) is partially redundant with the existing Write chart specs pre-agent step. Est. reduction: ~400 chars.
  5. Verify no double-import of shared/trends.md — check whether shared/trends.md and shared/python-dataviz.md both compile into the same prompt (low risk, verify with make recompile diff).

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 13,467
P95 chars 19,183
Largest sampled request 19,183 chars (Daily Code Metrics, AIC=236.84)
Merged optimizer PRs (7d) 3
Closed optimizer PRs (7d) 0
Optimizer PR close-rate (7d) 0%
Per-Run First-Request Metrics
Run Workflow Chars Headings Code Fences Dup Line% AIC System%
§29042654541 Daily Code Metrics 19,183 28 12 4.3% 236.84 49.6%
§29039556698 PR Code Quality Reviewer 14,013 16 8 2.5% 227.06 49.1%
§29043227257 Daily Safe Output Integrator 12,589 15 4 1.5% 96.81 66.7%
§29040714758 Daily Testify Uber Super Expert 12,921 19 4 1.3% 92.07 70.0%

Note: API proxy event logs not present; prompt.txt used as source.

Repeated Ambient Context Signals
  • <safe-outputs> block: 3,481 chars in all 4 runs — framework-managed
  • <mcp-clis> block: ~1,083 chars in all 4 runs — framework-managed
  • 31 lines >30 chars common to all 4 runs (~6,171 chars) — all framework-injected
  • shared/reporting.md (497 chars) included in 3/4 runs — already well-compressed
  • shared/trends.md (1,530 compiled chars) overlaps with python-dataviz.md on chart style prose
Deterministic Analysis Output

Script: /tmp/gh-aw/ambient-context/analyze_requests.py (stdlib only)

  • Highest dup-line ratio: 4.3% (Daily Code Metrics) vs 1.3–2.5% for others
  • System block share: 49–70% of compiled prompt (all framework-injected, not reducible here)
  • Daily Code Metrics: 28 headings, 12 code fences — most structural complexity of any sampled run
  • PR Code Quality Reviewer: 1 inline agent (1,111 chars), 5 step sections (5,138 chars total)

Recommendations by Category

Workflow Markdown

1. Condense daily-code-metrics.md data sections (high, needs_review)

  • File: .github/workflows/daily-code-metrics.md (11,046 chars; max reduction: 4,418 chars)
  • ## Metrics to Collect + ## Data Storage + # Prune history.jsonl = 2,475 chars of prose → ~400 chars as compact tables
  • Est. reduction: ~1,800 chars from compiled prompt

2. Trim shared/trends.md overlap (medium, needs_review)

  • File: .github/workflows/shared/trends.md (1,992 chars; max reduction: 797 chars)
  • Chart-style guidance (figsize, palettes, annotations) duplicates shared/python-dataviz.md
  • Keep repo-specific chart type list; drop generic styling prose
  • Est. reduction: ~700 chars from Daily Code Metrics prompt

3. Compress pr-code-quality-reviewer.md step prose (medium, safe)

  • File: .github/workflows/pr-code-quality-reviewer.md (10,116 chars; max reduction: 4,046 chars)
  • Steps 1 and 4 total 2,880 chars as prose paragraphs; rewrite as numbered bullets
  • Est. reduction: ~900–1,200 chars

4. Move Python path examples to pre-agent step (low, safe)

  • File: .github/workflows/daily-code-metrics.md
  • ### Python Script (529 chars) overlaps with the existing Write chart specs pre-agent step
  • Consolidate into pre-agent step script; remove from prompt body
  • Est. reduction: ~400 chars

Skills

5. Verify import deduplication for python-dataviz.md (low, safe)

  • shared/trends.md may re-import python-dataviz.md creating double-compilation
  • Run make recompile and diff compiled output before/after; no workflow text change needed

References

Generated by 🌫️ Daily Ambient Context Optimizer · 162.8 AIC · ⌖ 24 AIC · ⊞ 7.7K ·

  • expires on Jul 16, 2026, 12:34 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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