Executive Summary
- Sampled 4 completed runs across 4 distinct workflows in the last ~1h window (count-limited by MCP pagination; date range narrower than 24h).
- Median first-request size: 15,985 chars; P95: 16,124 chars.
- Largest sampled first request: Design Decision Gate (27,549 chars, 44 headings).
- No canonical
event-logs.jsonl API-proxy artifact or session-state events were available for the downloaded run bundles; all 4 samples used prompt.txt as a documented fallback source (compilation-debug artifact, flagged per source-of-truth rules).
- Two highest-cost runs audited: Daily Go Test Parallelizer (WSRF 5.78, 78 invocations, 549,927 rebuild-excess tokens) and Design Decision Gate (WSRF 1.74, 15 invocations, 20,979 rebuild-excess tokens). The Parallelizer's high WSRF despite a small (4,677 char) source file indicates static context (imports + inline agent) is being resent near-peak on nearly every turn rather than growing incrementally.
Highest-Leverage Changes
- Daily Go Test Parallelizer — reduce turn-over-turn context rebuild (WSRF 5.78) by trimming repeated static rule text sent to the
parallel-safety-batch-checker sub-agent call and offloading the safety-rule list to a referenced skill instead of inline repetition across turns.
- Design Decision Gate — largest sampled first request (44 headings, 4 report templates embedded inline: ADR-required, ADR-verified, ADR-diverges, plus skill block). Move the 3 large report templates (currently under
## skill: adr-report-templates, lines 378-441) fully out of the main prompt body into an on-demand skill file if not already lazy-loaded, since they inflate every invocation whether or not the corresponding branch is taken.
- AI Moderator —
tools.cli-proxy: false and github.mode: local (not gh-proxy). Enable cli-proxy: true and github.mode: gh-proxy to move deterministic GitHub reads off the main prompt path, consistent with the pattern already used by design-decision-gate.md and pr-description-caveman.md.
- PR Description Updater — lowest WSRF (1.26) and smallest sample (12,780 chars); no immediate action needed — used here as a size baseline.
- Repository-wide: none of the 4 sampled first requests contained
## skill:-imported SKILL.md references (skill_md_reference_count: 0 in all samples) — output templates and static rule blocks are being kept inline in workflow markdown rather than deferred to skills, which is the main lever available across this sample.
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 |
15,985 |
| P95 chars |
16,124 |
| Largest sampled request |
27,549 chars (Design Decision Gate) |
| Merged optimizer PRs (7d) |
4 |
| Closed optimizer PRs (7d) |
0 |
| Optimizer PR close-rate (7d) |
0% |
| WSRF (audited runs) |
Daily Go Test Parallelizer: 5.78; Design Decision Gate: 1.74 |
Per-Run First-Request Metrics
| Run |
Workflow |
Chars |
Headings |
Skill refs |
Inline agents |
Dup line ratio |
WSRF |
| 33268456857 |
Daily Go Test Parallelizer |
15,845 |
7 |
0 |
0 |
0.0 |
5.78 |
| 33269199660 |
AI Moderator |
16,124 |
13 |
0 |
0 |
0.0 |
6.21 |
| 33269954213 |
Design Decision Gate 🏗️ |
27,549 |
44 |
0 |
0 |
0.0 |
1.74 |
| 33269962979 |
PR Description Updater |
12,780 |
13 |
0 |
0 |
0.0 |
1.26 |
Repeated Ambient Context Signals
- No cross-run duplicate line/paragraph fragments detected (each workflow's static context is workflow-specific, not shared boilerplate) — so cross-workflow dedup is low-value here; the leverage is within-run turn repetition (WSRF) and inline template bloat, not shared text across workflows.
- All 4 samples show
inline_agent_count: 0 and inline_skill_count: 0 at the top level of the extracted first request (agent/skill blocks appear later in the source file, e.g. ## agent: in Daily Go Test Parallelizer and PR Description Updater, ## skill: adr-report-templates in Design Decision Gate) — these get compiled into the prompt but were not present in the first-request preamble slice analyzed.
- Design Decision Gate embeds 3 full report templates (ADR-required / ADR-verified / diverges) inline under one skill heading rather than as 3 separately-loadable skills — all 3 load unconditionally even though only one applies per run.
Deterministic Analysis Output
- Script:
/tmp/gh-aw/ambient-context/analyze_requests.py (stdlib only), outputs request-analysis.json / .md.
- Confirms 0% duplicate-line ratio across all 4 samples — bloat is structural (heading/template count), not literal repetition.
- Design Decision Gate has 44 headings vs. 7-13 for the other 3 workflows — a 3-4x heading density outlier.
Recommendations by Category
Workflow Markdown
- daily-go-test-parallelizer.md: safe immediately — tighten the sub-agent call contract in "Batched analysis agent" section to avoid restating the full safety-rule list on repeated invocations across turns (targets the WSRF 5.78 finding); impact: high.
- ai-moderator.md: safe immediately — flip
tools.cli-proxy: false → true and tools.github.mode: local → gh-proxy to match the proxy pattern already adopted elsewhere in the repo; impact: medium.
- design-decision-gate.md: needs manual review — do not shrink below 1,000 chars or by >40% (currently 20,946 chars); relocate the 3 embedded report templates into separate on-demand skill files loaded only on the matching branch; impact: high.
Skills
- Extract Design Decision Gate's 3 report templates (
### 🏗️ ADR Required, ### ✅ ADR Verified, ### ⚠️ ADR Diverges) into 3 discrete ## skill: blocks or files so only the applicable one is loaded per run instead of all three unconditionally; impact: medium, needs manual review (verify report-format compatibility with downstream consumers first).
Agents
- No inline-agent removal recommended this cycle —
parallel-safety-batch-checker (Daily Go Test Parallelizer) and chunk-analyzer/pr-description-synthesizer (PR Description Updater) are each single-purpose and appropriately scoped; impact: low/none.
References
Generated by 🌫️ Daily Ambient Context Optimizer · copilot · auto · 66.1 AIC · ⌖ 7.15 AIC · ⊞ 11.8K · ◷
Executive Summary
event-logs.jsonlAPI-proxy artifact or session-state events were available for the downloaded run bundles; all 4 samples usedprompt.txtas a documented fallback source (compilation-debug artifact, flagged per source-of-truth rules).Highest-Leverage Changes
parallel-safety-batch-checkersub-agent call and offloading the safety-rule list to a referenced skill instead of inline repetition across turns.## skill: adr-report-templates, lines 378-441) fully out of the main prompt body into an on-demand skill file if not already lazy-loaded, since they inflate every invocation whether or not the corresponding branch is taken.tools.cli-proxy: falseandgithub.mode: local(notgh-proxy). Enablecli-proxy: trueandgithub.mode: gh-proxyto move deterministic GitHub reads off the main prompt path, consistent with the pattern already used bydesign-decision-gate.mdandpr-description-caveman.md.## skill:-importedSKILL.mdreferences (skill_md_reference_count: 0in all samples) — output templates and static rule blocks are being kept inline in workflow markdown rather than deferred to skills, which is the main lever available across this sample.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
inline_agent_count: 0andinline_skill_count: 0at the top level of the extracted first request (agent/skill blocks appear later in the source file, e.g.## agent:in Daily Go Test Parallelizer and PR Description Updater,## skill: adr-report-templatesin Design Decision Gate) — these get compiled into the prompt but were not present in the first-request preamble slice analyzed.Deterministic Analysis Output
/tmp/gh-aw/ambient-context/analyze_requests.py(stdlib only), outputsrequest-analysis.json/.md.Recommendations by Category
Workflow Markdown
tools.cli-proxy: false→trueandtools.github.mode: local→gh-proxyto match the proxy pattern already adopted elsewhere in the repo; impact: medium.Skills
### 🏗️ ADR Required,### ✅ ADR Verified,### ⚠️ ADR Diverges) into 3 discrete## skill:blocks or files so only the applicable one is loaded per run instead of all three unconditionally; impact: medium, needs manual review (verify report-format compatibility with downstream consumers first).Agents
parallel-safety-batch-checker(Daily Go Test Parallelizer) andchunk-analyzer/pr-description-synthesizer(PR Description Updater) are each single-purpose and appropriately scoped; impact: low/none.References