Skip to content

[ambient-context] Daily Ambient Context Optimizer - 2026-08-22 #54905

Description

@github-actions

Executive Summary

  • Runs sampled: 4 completed runs across 4 distinct workflows (last ~20 min of the 24h window; broader pagination was rate-limited by the logs MCP tool at count=20/60).
  • Workflows covered: Avenger (CI fixer), Matt Pocock Skills Reviewer, Ponytail Reviewer, Impeccable Skills Reviewer.
  • Median first-request size: 17,160 chars · P95: 19,514 chars.
  • Conclusion: The three PR-review workflows share a near-identical inline instruction skeleton (## Process, numbered Step N sections, safe-output JSON examples, <details> templates) duplicated per-workflow instead of factored into a shared skill/import. Matt Pocock Reviewer's pr-triage inline agent and full skill-guidance-by-skill text block are the single largest structural contributor (~19.5K chars). All three reviewers already use gh-proxy/cli-proxy; Ponytail Reviewer has no tools: proxy config at all despite similar diff-fetch needs.

Highest-Leverage Changes

  1. Extract the shared review-workflow skeleton (Steps 1–7 headings, JSON examples, progressive-disclosure <details> template) from mattpocock-skills-reviewer.md and impeccable-skills-reviewer.md into a common shared/skill-review-process.md import.
  2. Move the per-skill "Focus areas by skill" guidance block (5 skill writeups, ~2.3K chars) in mattpocock-skills-reviewer.md into a loaded ## skill: block instead of always-inline text.
  3. Enable tools.github.mode: gh-proxy and cli-proxy: true on ponytail-reviewer.md, matching its siblings, and confirm reliance on any raw gh shell calls is minimized.
  4. Review whether the inline pr-triage sub-agent in Matt Pocock Reviewer needs its full JSON schema/skill-mapping table restated in the parent prompt, or if that can be trimmed since the agent definition itself carries it.

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 17,160
P95 chars 19,514
Largest sampled request 19,514 chars (Matt Pocock Skills Reviewer, run 32594519979)
Merged optimizer PRs (7d) 0
Closed optimizer PRs (7d) 0
Optimizer PR close-rate (7d) n/a (insufficient settled data)
WSRF (audited runs) 1.001–1.141 (Avenger 1.001, Ponytail 1.005, Matt Pocock 1.099, Impeccable 1.141)
Per-Run First-Request Metrics
Run Workflow Chars Lines Headings Details blocks Inline agents WSRF
32593997838 Avenger 17,160 259 0 1.001
32594519979 Matt Pocock Skills Reviewer 19,514 293 14 1 1 (pr-triage) 1.099
32594519982 Ponytail Reviewer 12,059 138 0 1.005
32594520028 Impeccable Skills Reviewer 14,011 205 0 1.141

Note: request text source was aw-prompts/prompt.txt for all four runs — no event-logs.jsonl/events.jsonl artifact was present in the cached run data for this sample, so this is used per the fallback rule with the compiler-debug caveat acknowledged.

Repeated Ambient Context Signals
  • All three PR-review workflows (Matt Pocock, Impeccable, Ponytail) repeat the same shape: ## Process → numbered Step N: sections → JSON/markdown examples for inline review comments → progressive-disclosure <details> guidance — duplicated per workflow rather than shared.
  • Matt Pocock Reviewer inlines a full 5-skill "Focus areas by skill" reference (~2.3K chars) unconditionally, even though only 1–2 skills are typically selected by pr-triage per PR.
  • The inline pr-triage agent definition restates its full JSON schema and skill-mapping table inside the same file already described in the parent prompt's Step 3, adding redundant explanatory text.
  • Ponytail Reviewer has no tools: block (gh-proxy/cli-proxy unset) while its two-sibling workflows already use both, despite similar diff/PR-data needs — a config-parity gap.
Deterministic Analysis Output
  • Aggregate script output (/tmp/gh-aw/ambient-context/request-analysis.json): 4 sampled runs, 4 distinct workflows, median 17,160 chars, P95 19,514 chars.
  • Repeated markdown code-fence markers (``` / ```bash) appeared in all 4 samples — expected baseline noise, not a targeted signal.
  • Largest recurring headings across samples (by section length in lines): "## Process" (61 lines), "### Step 4: Review Using Selected Skills" (39 lines), "### Step 5: Post Inline Review Comments" (20 lines), "## Step 2: Recompile workflows" (17 lines, Avenger), "### Step 1: Load Pre-fetched PR Data" (16 lines) — these are the highest-leverage candidates for shared-import extraction.

Recommendations by Category

Workflow Markdown

  1. Extract shared review skeletonmattpocock-skills-reviewer.md, impeccable-skills-reviewer.md (and optionally ponytail-reviewer.md) share near-identical Step 1/4/5/6 structure. Move the common process scaffolding into a shared/skill-review-process.md import. Evidence: "## Process" and "Step N" headings are the top 3 largest repeated sections across all 3 reviewer samples. Impact: medium (est. 20–30% reduction in reviewer prompt duplication). Safe to implement with manual review (must preserve per-workflow skill lists and safe-output config).
  2. Enable gh-proxy/cli-proxy on Ponytail Reviewerponytail-reviewer.md has no tools: block while its siblings both set cli-proxy: true and github.mode: gh-proxy. Evidence: config diff against mattpocock-skills-reviewer.md/impeccable-skills-reviewer.md. Impact: low-medium (consistency + reduces raw gh shell calls). Safe to implement immediately.

Skills

  1. Load per-skill guidance on demand — Matt Pocock Reviewer's "Focus areas by skill" block inlines full guidance for all 5 skills (~2.3K chars) even though pr-triage typically narrows to 1–2 relevant skills. Evidence: dup_paragraph_ratio and section-size metrics for run 32594519979 (largest sampled request, 19,514 chars). Convert to a ## skill: reference loaded conditionally based on pr-triage output. Impact: medium. Needs manual review (must not break the "Only read a skill file when inline guidance is insufficient" fallback logic).

Agents

  1. Trim inline pr-triage agent definition — the agent restates its full JSON schema/skill-mapping table separately from the parent prompt's Step 3 description, adding redundant text within the same first request. Evidence: inline_agents: 1 + 19,514-char total for run 32594519979, the largest sample. Impact: low-medium. Safe to implement with manual review (verify JSON schema is still enforced correctly for fallback parsing).

References

Generated by 🌫️ Daily Ambient Context Optimizer · auto · 68 AIC · ⌖ 15.1 AIC · ⊞ 13.1K ·

  • expires on Aug 29, 2026, 11:59 AM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions