Executive Summary
- Runs sampled: 4 (Daily Cache Strategy Analyzer, Agent Persona Explorer, Smoke Copilot, Linter Miner) — all
completed, distinct workflows, breadth-first selection.
- Workflows covered: 4 distinct
.lock.yml targets.
- Median first-request size: ~17,032 chars · P95: 19,331 chars.
- Conclusion: No blocked-file recommendations were needed (3 workflows from a recent closed optimizer PR were excluded per the dedup guard). First requests are moderate-sized but show recurring duplicate table/heading fragments from
shared/reporting.md and shared/mcp/serena-go.md imports repeated across workflows, plus a very high token_usage outlier (Smoke Copilot, 1.24M tokens vs a 14.7KB first request) suggesting continuation-turn cost rather than first-request bloat.
- Note:
prompt.txt was the only usable request source in this run's downloaded artifacts (no sandbox/firewall or copilot-session-state event logs were present); used per the fallback rule.
Highest-Leverage Changes
- Deduplicate the
## Report Structure Guidelines / ## Workflow Run References blocks from shared/reporting.md — appears in 3+ sampled first requests; move common report boilerplate into a single condensed shared fragment.
- Trim
shared/mcp/serena-go.md "Serena Go Code Analysis" section — repeated verbatim in 2 sampled requests; consolidate with shared/mcp/serena.md to avoid double-loading similar tool guidance.
- Reduce
daily-cache-strategy-analyzer.md's duplicate table/example rows (duplicate_line_ratio 0.15, duplicate_paragraph_ratio 0.14 — highest of the sample) — collapse repeated | Workflow | Miss Streak | ... | example rows into one illustrative row.
- Investigate Smoke Copilot's outsized
token_usage (1.24M) vs its 14.7KB first request — likely a continuation/retry loop, not ambient context; recommend adding a max-continuations or turn-budget guardrail rather than trimming the prompt.
- All 4 sampled workflows already have
tools.github.mode: gh-proxy and tools.cli-proxy: true enabled — no proxy-enablement recommendation needed this cycle.
CI-Validation Checklist for Implementing Agents
Any agent implementing workflow-file recommendations must complete every item below before opening a PR:
Key Metrics
| Metric |
Value |
| Sampled runs |
4 |
| Distinct workflows |
4 |
| Median chars |
17,032 |
| P95 chars |
19,331 |
| Largest sampled request |
Daily Cache Strategy Analyzer (21,156 chars) |
| Merged optimizer PRs (7d) |
0 |
| Closed optimizer PRs (7d) |
1 |
| Optimizer PR close-rate (7d) |
n/a (< 3 settled PRs; auto-pause not triggered) |
Per-Run First-Request Metrics
| Run |
Workflow |
Status |
Chars |
Headings |
Code Fences |
Details |
Dup Line Ratio |
Dup Para Ratio |
| §30389296712 |
Daily Cache Strategy Analyzer |
success |
21,156 |
33 |
22 |
6 |
0.155 |
0.137 |
| §30376833278 |
Agent Persona Explorer |
success |
19,331 |
24 |
10 |
5 |
0.041 |
0.012 |
| §30377662004 |
Smoke Copilot |
failure |
14,732 |
10 |
2 |
1 |
0.007 |
0.000 |
| run-30384667352 |
Linter Miner |
failure |
14,216 |
14 |
2 |
0 |
0.056 |
0.131 |
Repeated Ambient Context Signals
## Report Structure Guidelines / ## Workflow Run References (from shared/reporting.md) recur across 3 sampled requests.
## Serena Go Code Analysis (from shared/mcp/serena-go.md) recurs across 2 sampled requests; a near-duplicate ## Serena Code Analysis exists in shared/mcp/serena.md.
- Daily Cache Strategy Analyzer's example table rows (
| Workflow | Miss Streak | ... |) are duplicated verbatim as both header and filled-example, inflating duplicate-line/paragraph ratios well above the other 3 samples.
- No inline
## agent:, ## linter:, or ## skill: blocks were found in any sampled request — 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) → request-analysis.json / .md.
- Aggregate: 4 sampled runs, 4 distinct workflows, median 17,032 chars, P95 19,331 chars.
most_common_large_section_headings: Report Structure Guidelines (3x), Workflow Run References (3x), Important Guidelines (2x), Success Criteria (2x), Serena Go/Code Analysis (2x), Analysis Constraints (2x).
- Highest duplicate-line ratio: Daily Cache Strategy Analyzer (0.155) — driven by repeated example table rows.
char_token_ratio could not be computed for any sample (no per-request input_tokens entry available in token_usage.jsonl for the first request specifically); token_usage totals were used instead for cost context.
- Audit enrichment was run for the single most expensive sampled run (Daily Cache Strategy Analyzer,
agenticworkflows audit --run_id 30389296712), confirming no elevated GitHub API quota consumption tied to the request itself.
Recommendations by Category
Workflow Markdown
- daily-cache-strategy-analyzer.md — collapse duplicated example/header table rows in the "Phase 2: Detect Cache Issues" / "Phase 3: Cross-Reference" sections (evidence: dup_line_ratio 0.155, dup_para_ratio 0.137, both highest in sample). Expected impact: medium. Safe to apply immediately with the CI-validation checklist above.
- smoke-copilot.md — do not shrink the first request (already lean at 14.7KB); instead add/verify a continuation-turn or max-turns guardrail given token_usage of 1.24M against a small first request. Expected impact: high (cost), but needs manual review (behavioral, not textual, change).
Skills
- Consolidate
shared/mcp/serena.md and shared/mcp/serena-go.md "Code Analysis" sections into one parameterized fragment referenced by both, reducing duplicate content pulled into every workflow that imports either. Evidence: identical heading pattern appears in 2/4 samples. Expected impact: medium. Needs manual review (shared file, used by many workflows).
- Trim
shared/reporting.md's "Report Structure Guidelines" / "Workflow Run References" boilerplate to the minimum needed per consuming workflow, or move some of it to deterministic steps: output. Evidence: appears in 3/4 samples' longest-sections list. Expected impact: medium, safe to apply immediately with the checklist.
Agents
- No inline
## agent: blocks were observed in the sampled first requests (inline_agent_count = 0 for all 4), so no inline-agent-pruning recommendation is warranted this cycle. Continue monitoring in future sampling windows.
References
Generated by 🌫️ Daily Ambient Context Optimizer · sonnet50 · 77 AIC · ⌖ 8.56 AIC · ⊞ 10.7K · ◷
Executive Summary
completed, distinct workflows, breadth-first selection..lock.ymltargets.shared/reporting.mdandshared/mcp/serena-go.mdimports repeated across workflows, plus a very hightoken_usageoutlier (Smoke Copilot, 1.24M tokens vs a 14.7KB first request) suggesting continuation-turn cost rather than first-request bloat.prompt.txtwas the only usable request source in this run's downloaded artifacts (nosandbox/firewallorcopilot-session-stateevent logs were present); used per the fallback rule.Highest-Leverage Changes
## Report Structure Guidelines/## Workflow Run Referencesblocks fromshared/reporting.md— appears in 3+ sampled first requests; move common report boilerplate into a single condensed shared fragment.shared/mcp/serena-go.md"Serena Go Code Analysis" section — repeated verbatim in 2 sampled requests; consolidate withshared/mcp/serena.mdto avoid double-loading similar tool guidance.daily-cache-strategy-analyzer.md's duplicate table/example rows (duplicate_line_ratio 0.15, duplicate_paragraph_ratio 0.14 — highest of the sample) — collapse repeated| Workflow | Miss Streak | ... |example rows into one illustrative row.token_usage(1.24M) vs its 14.7KB first request — likely a continuation/retry loop, not ambient context; recommend adding a max-continuations or turn-budget guardrail rather than trimming the prompt.tools.github.mode: gh-proxyandtools.cli-proxy: trueenabled — no proxy-enablement recommendation needed this cycle.CI-Validation Checklist for Implementing Agents
Any agent implementing workflow-file recommendations must complete every item below before opening a PR:
make recompilefor every modified.github/workflows/*.mdfile — zero compilation errors requiredmake agent-report-progressbefore the final commit and confirm it passesblocked_fileslist 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.lock.ymlchanges in the PR bodyKey Metrics
Per-Run First-Request Metrics
Repeated Ambient Context Signals
## Report Structure Guidelines/## Workflow Run References(fromshared/reporting.md) recur across 3 sampled requests.## Serena Go Code Analysis(fromshared/mcp/serena-go.md) recurs across 2 sampled requests; a near-duplicate## Serena Code Analysisexists inshared/mcp/serena.md.| Workflow | Miss Streak | ... |) are duplicated verbatim as both header and filled-example, inflating duplicate-line/paragraph ratios well above the other 3 samples.## agent:,## linter:, or## skill:blocks were found in any sampled request — 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) →request-analysis.json/.md.most_common_large_section_headings:Report Structure Guidelines(3x),Workflow Run References(3x),Important Guidelines(2x),Success Criteria(2x),Serena Go/Code Analysis(2x),Analysis Constraints(2x).char_token_ratiocould not be computed for any sample (no per-requestinput_tokensentry available intoken_usage.jsonlfor the first request specifically);token_usagetotals were used instead for cost context.agenticworkflows audit --run_id 30389296712), confirming no elevated GitHub API quota consumption tied to the request itself.Recommendations by Category
Workflow Markdown
Skills
shared/mcp/serena.mdandshared/mcp/serena-go.md"Code Analysis" sections into one parameterized fragment referenced by both, reducing duplicate content pulled into every workflow that imports either. Evidence: identical heading pattern appears in 2/4 samples. Expected impact: medium. Needs manual review (shared file, used by many workflows).shared/reporting.md's "Report Structure Guidelines" / "Workflow Run References" boilerplate to the minimum needed per consuming workflow, or move some of it to deterministicsteps:output. Evidence: appears in 3/4 samples' longest-sections list. Expected impact: medium, safe to apply immediately with the checklist.Agents
## agent:blocks were observed in the sampled first requests (inline_agent_count = 0 for all 4), so no inline-agent-pruning recommendation is warranted this cycle. Continue monitoring in future sampling windows.References