Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-08-29 #56957

Description

@github-actions

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

  1. 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.
  2. 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.
  3. AI Moderatortools.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.
  4. PR Description Updater — lowest WSRF (1.26) and smallest sample (12,780 chars); no immediate action needed — used here as a size baseline.
  5. 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:

  • 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,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: falsetrue and tools.github.mode: localgh-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 ·

  • expires on Sep 5, 2026, 12:00 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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions