Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-06-06 #37392

@github-actions

Description

@github-actions

Executive Summary

  • 4 runs sampled across 4 distinct workflows (Matt Pocock Skills Reviewer, Contribution Check, Test Quality Sentinel, Documentation Unbloat)
  • Median first-request size: 17,077 chars · P95: 18,909 chars · Outlier: Test Quality Sentinel at 28,417 chars (66% above P95)
  • All 4 workflows have cli-proxy: true; Matt Pocock Skills Reviewer is missing tools.github.mode: gh-proxy
  • Highest-leverage wins: extract 2 inline agent defs from Contribution Check (~1,500 chars saved), collapse duplicated per-skill guidance in Matt Pocock (~2,700 chars), and trim Test Quality Sentinel's embedded report template (~3,000 chars)

Highest-Leverage Changes

  1. [agents] Extract report-formatter and comment-dispatcher inline agent definitions from contribution-check.md into separate .agent.md files — removes ~1,500 chars from the orchestrator first-request (high, needs manual review)
  2. [workflow-md] Collapse ## Available Matt Pocock Skills inline descriptions + Step 4 per-skill guidance blocks in mattpocock-skills-reviewer.md into single-line SKILL.md references — saves ~2,700 chars from the most expensive run by AIC (high, needs manual review)
  3. [workflow-md] Trim Test Quality Sentinel's Step 7 embedded full report-comment template (~100 lines of placeholder prose) to a compact skeleton — the largest prompt at 28,417 chars with 10.1% duplicate-line ratio (medium, needs manual review)
  4. [workflow-md] Consolidate 13–19 scattered safe-output instruction mentions per workflow (across Matt Pocock, Contribution Check, Test Quality Sentinel) into one canonical block near the top of each workflow — reduces per-step repetition (medium, partially safe to automate)
  5. [workflow-md] Delete the ## Important section in contribution-check.md (1,109 chars) — it re-states rules already present in the numbered orchestrator steps (medium, safe to automate)
  6. [workflow-md] Add tools.github.mode: gh-proxy to mattpocock-skills-reviewer.md — the highest-AIC run (772.9 AIC, 34 turns) currently uses only cli-proxy: true, missing proper MCP tool routing for GitHub reads (low, safe to automate)

Key Metrics

Metric Value
Sampled runs 4
Distinct workflows 4
Median chars 17,077
P95 chars 18,909
Largest sampled request Test Quality Sentinel — 28,417 chars
Per-Run First-Request Metrics
Run Workflow Chars AIC Tokens Turns Dup-Line Ratio Source
§27069914142 Test Quality Sentinel 28,417 403.3 1,096,917 31 10.1% prompt.txt
§27068039186 Documentation Unbloat 18,909 385.8 1,835,970 34 6.8% prompt.txt
§27069819359 Matt Pocock Skills Reviewer 15,245 772.9 2,209,814 34 3.2% prompt.txt
§27068700952 Contribution Check 12,388 488.2 1,379,626 45 5.3% prompt.txt
Repeated Ambient Context Signals
  • Safe-output instructions repeated per step: Matt Pocock (13 mentions), Contribution Check (19 mentions), Test Quality Sentinel (13 mentions) — all three contain the same safe-output guardrail language in multiple steps rather than once at the top
  • Inline skill summaries duplicated by external SKILL.md: Matt Pocock Skills Reviewer embeds a ~200-char description for each of 6 skills inside the prompt, while skill_md_count=1 confirms those same skills are already available from loaded SKILL.md files at runtime
  • Per-skill guidance blocks in Step 4 (/diagnose, /tdd, /zoom-out, /improve-codebase-architecture, /grill-with-docs) — each ~200 chars, totalling the largest section (1,560 chars) in the Matt Pocock prompt
  • ## Important section in Contribution Check re-states orchestrator identity, pre-computed step guidance, and safe-output noop rules already covered in the numbered workflow steps
  • Embedded report-comment template in Test Quality Sentinel Step 7: a ~100-line markdown template with placeholder syntax is fully inlined in the prompt, contributing to the 28,417-char first request and 10.1% duplicate-line ratio
  • Two inline agent definitions (report-formatter, comment-dispatcher) embedded in Contribution Check — loaded on every orchestrator turn rather than fetched lazily by the sub-agent runtime
Deterministic Analysis Output

Script: /tmp/gh-aw/ambient-context/analyze_requests.py — stdlib only, no third-party packages.

Key per-run findings:

  • Test Quality Sentinel: 51 headings, 26 code fences, 12 <details> blocks, 19 table rows, dup_line_ratio=10.1%, dup_para_ratio=2.1% — highest structural complexity in the sample; cat /tmp/gh-aw/agent/diff-numstat.txt appears twice (duplicated shell snippet across Step 5)
  • Contribution Check: safe_output_mentions=19 (highest in sample); two inline ## agent: blocks add ~1,500 chars to the orchestrator first request; dup_line_ratio=5.3%
  • Matt Pocock Skills Reviewer: skill_md_count=1 (external SKILL.md loaded) yet also contains full inline skill summaries for all 6 skills; largest section by chars is Step 4 (1,560 chars); tools.github.mode not configured
  • Documentation Unbloat: 34 headings, 20 code fences, dup_line_ratio=6.8%, 4 <details> blocks — second-largest prompt with no skill references

Aggregate: most common repeated fragments are shell snippets (cat /tmp/gh-aw/agent/diff-numstat.txt, JSON event literals) reused across steps.

Recommendations by Category

Workflow Markdown

  • Remove ## Important section in contribution-check.md (1,109 chars) — duplicates orchestrator identity and noop rules from numbered steps. Safe to remove immediately.
  • Consolidate safe-output instructions in mattpocock-skills-reviewer.md, contribution-check.md, and test-quality-sentinel.md: replace per-step repetition with a single canonical block. Needs light manual review to verify no step-specific nuances are lost.
  • Shrink Step 7 report template in test-quality-sentinel.md: replace the full ~100-line comment-format example with a 10-line skeleton plus a link to a shared template. Estimated savings: ~3,000 chars from the 28,417-char prompt.
  • Add tools.github.mode: gh-proxy to mattpocock-skills-reviewer.md (only cli-proxy: true is set). Safe to add immediately; enables gh-proxy routing for GitHub reads.

Skills

  • Collapse inline skill summaries in mattpocock-skills-reviewer.md: the ## Available Matt Pocock Skills section (1,125 chars) and per-skill Step 4 guidance blocks (1,560 chars combined) duplicate content already in the loaded SKILL.md. Replace both with: Apply each selected skill according to its SKILL.md definition. Saves ~2,700 chars; needs manual verification that no guidance is lost.

Agents

  • Extract report-formatter and comment-dispatcher from contribution-check.md into separate .github/agents/*.agent.md files. Their full prompts (~1,500 chars) are loaded into every orchestrator request even though they are only invoked at the end. Referencing them by name instead lets the runtime load them lazily. Needs manual review to ensure sub-agent routing still resolves correctly.

References

  • §27069819359 — Matt Pocock Skills Reviewer (highest AIC: 772.9)
  • §27068700952 — Contribution Check (45 turns, 488.2 AIC)
  • §27069914142 — Test Quality Sentinel (largest prompt: 28,417 chars)

Generated by 🌫️ Daily Ambient Context Optimizer · 723.1 AIC · ⌖ 23.2 AIC · ⊞ 21K ambient context ·

  • expires on Jun 13, 2026, 8:13 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions