Executive Summary
- 4 runs sampled across 4 distinct workflows
- Median first-request size: 15,534 chars; P95: 22,535 chars
- System-injected infrastructure (safe-outputs, tool docs, github-context) accounts for 43–56% of every prompt, while the workflow-specific narrative drives the remainder
- Highest-leverage opportunity: the
daily-code-metrics report template embeds both conditional variant bodies simultaneously, inflating the prompt with dead content for the inactive variant
Highest-Leverage Changes
- Collapse the dual-variant report template in
daily-code-metrics.md — both full_detail and executive_summary templates are inlined simultaneously; only the active variant should be rendered, saving ~1,250 chars (~5.5%)
- Compress the Required Charts section in
daily-code-metrics.md from a verbose 6-row Markdown table to a compact numbered list, saving ~820 chars (~3.6%)
- Move Go file templates from
linter-miner.md Step 5 into the linter-writer sub-agent body — the 3-file Go scaffold is loaded in every turn including planning turns that never use it, wasting ~1,500 chars (~9%) on the linter-miner prompt
- Trim
linter-miner.md Guidelines section from 11 generic Go conventions to 3-4 gh-aw-specific linter rules; remove items already covered by the serena-go.md import, saving ~750 chars (~5%)
- Reduce verbose experiment chart descriptions in
daily-code-metrics.md Required Charts — table cells contain multi-sentence chart specs; extract stable chart specs to a shared import
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,534 |
| P95 chars |
22,535 |
| Largest sampled request |
22,535 chars (Daily Code Metrics) |
| Merged optimizer PRs (7d) |
5 |
| Closed optimizer PRs (7d) |
0 |
| Optimizer PR close-rate (7d) |
0% |
Per-Run First-Request Metrics
| Run |
Workflow |
Chars |
Lines |
Headings |
AIC |
Ambient Ctx Tokens |
Source |
| §28678275970 |
Daily Code Metrics |
22,535 |
414 |
33 |
301 |
9,605 |
prompt.txt |
| §28676120195 |
Linter Miner |
16,311 |
264 |
17 |
134 |
6,148 |
prompt.txt |
| §28674547373 |
Contribution Check |
14,757 |
208 |
15 |
132 |
6,293 |
prompt.txt |
| §28679073551 |
Failure Investigator |
12,335 |
178 |
15 |
100 |
5,186 |
prompt.txt |
Repeated Ambient Context Signals
- System block dominance: The
<system> block is 42–56% of each prompt (6,851–9,512 chars), carrying identical security policy, safe-output boilerplate, and tool docs across all runs
- Safe-outputs combined overhead: The
<safe-outputs> + <safe-output-tools> blocks together consume 30–51% of each total prompt (6,836–8,359 chars), with the linter-miner PR tool spec alone at 4,878 chars
- Duplicate image placeholders:
daily-code-metrics loads both report variant templates simultaneously;  and  each appear twice
- Chart spec verbosity: The Required Charts table uses multi-sentence descriptions inside table cells — the least token-efficient prose container in Markdown
Deterministic Analysis Output
From analyze_requests.py on 4 sampled runs:
- All 4 workflows have
gh-proxy and cli-proxy enabled — no proxy gap
- Duplicate line ratio: 0.009 (daily-code-metrics), 0.0 (others)
- Duplicate paragraph ratio: 0.0 across all runs
- Keyword density: ~21–28 safe-output-mentions per prompt — consistent with framework injection
- Largest repeated non-trivial lines:
 x2,  x2
Recommendations by Category
Workflow Markdown
-
[HIGH] Collapse dual-variant template in daily-code-metrics.md (lines 175–255)
- Evidence: 84-line template with both variant bodies inlined; 2 image placeholders each appear twice due to
{{#if}} block duplication; ~1,250 chars waste
- Why it shrinks: Only one variant is active at runtime; the inactive block is dead weight
- Impact: High | Safe immediately
-
[MEDIUM] Replace Required Charts verbose table with compact list in daily-code-metrics.md (lines 135–150)
- Evidence: 6-row Markdown table = 1,237 chars; equivalent numbered list ≈ 400 chars
- Why it shrinks: Table delimiters inflate content ~3× over an equivalent list; saves ~820 chars
- Impact: Medium | Needs review to preserve chart spec accuracy
-
[MEDIUM] Move Go file templates from linter-miner.md Step 5 into linter-writer sub-agent body
- Evidence: 3-file Go scaffold is 1,682 chars in orchestrator prompt; loaded on every turn including
discussion-miner/code-pattern-scanner turns that never reference them
- Why it shrinks: Confines template tokens to the single
linter-writer dispatch turn; saves ~1,500 chars (~9%)
- Impact: Medium | Needs review to confirm sub-agent has full template access
Skills
- [LOW] Trim
linter-miner.md Guidelines from 11 generic Go rules to 3-4 gh-aw-specific rules
- Evidence: 1,211-char section duplicates coverage from
serena-go.md import and model training
- Why it shrinks: Removes items redundant with existing imports; saves ~750 chars (~5%)
- Impact: Low | Needs review to identify gh-aw-specific items to keep
Agents
- [MEDIUM] Audit
linter-miner.md inline agent encapsulation
- Evidence:
linter-writer inline agent body contributes verbose file templates to orchestrator context every turn; 3 inline agents defined but Step 5 templates still live in the parent workflow
- Why it shrinks: Proper sub-agent encapsulation ensures file templates appear only in the sub-agent context, not the orchestrator
- Impact: Medium | Safe; improves token efficiency and separation of concerns
References
Generated by 🌫️ Daily Ambient Context Optimizer · 191.2 AIC · ⌖ 21.8 AIC · ⊞ 7.6K · ◷
Executive Summary
daily-code-metricsreport template embeds both conditional variant bodies simultaneously, inflating the prompt with dead content for the inactive variantHighest-Leverage Changes
daily-code-metrics.md— both full_detail and executive_summary templates are inlined simultaneously; only the active variant should be rendered, saving ~1,250 chars (~5.5%)daily-code-metrics.mdfrom a verbose 6-row Markdown table to a compact numbered list, saving ~820 chars (~3.6%)linter-miner.mdStep 5 into thelinter-writersub-agent body — the 3-file Go scaffold is loaded in every turn including planning turns that never use it, wasting ~1,500 chars (~9%) on the linter-miner promptlinter-miner.mdGuidelines section from 11 generic Go conventions to 3-4 gh-aw-specific linter rules; remove items already covered by theserena-go.mdimport, saving ~750 chars (~5%)daily-code-metrics.mdRequired Charts— table cells contain multi-sentence chart specs; extract stable chart specs to a shared importCI-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
<system>block is 42–56% of each prompt (6,851–9,512 chars), carrying identical security policy, safe-output boilerplate, and tool docs across all runs<safe-outputs>+<safe-output-tools>blocks together consume 30–51% of each total prompt (6,836–8,359 chars), with the linter-miner PR tool spec alone at 4,878 charsdaily-code-metricsloads both report variant templates simultaneously;andeach appear twiceDeterministic Analysis Output
From
analyze_requests.pyon 4 sampled runs:gh-proxyandcli-proxyenabled — no proxy gapx2,x2Recommendations by Category
Workflow Markdown
[HIGH] Collapse dual-variant template in
daily-code-metrics.md(lines 175–255){{#if}}block duplication; ~1,250 chars waste[MEDIUM] Replace Required Charts verbose table with compact list in
daily-code-metrics.md(lines 135–150)[MEDIUM] Move Go file templates from
linter-miner.mdStep 5 intolinter-writersub-agent bodydiscussion-miner/code-pattern-scannerturns that never reference themlinter-writerdispatch turn; saves ~1,500 chars (~9%)Skills
linter-miner.mdGuidelines from 11 generic Go rules to 3-4 gh-aw-specific rulesserena-go.mdimport and model trainingAgents
linter-miner.mdinline agent encapsulationlinter-writerinline agent body contributes verbose file templates to orchestrator context every turn; 3 inline agents defined but Step 5 templates still live in the parent workflowReferences