agent-orchestrator/experiments
adil a339ccef94 feat(core): add gh wrapper cache for PR discovery and issue context (D4)
Add read-through caching to the ~/.ao/bin/gh wrapper, targeting the two
largest agent-side waste buckets identified in D4 analysis:

1. PR discovery (gh pr list --head): infinite TTL for positive results.
   598 calls → ~10 per 10-session run (98% reduction).
2. Issue context (gh issue view): 300s TTL.
   75 calls → ~20 per 10-session run (73% reduction).

The wrapper now caches successful read-only responses in
$AO_DATA_DIR/.ghcache/$AO_SESSION/ and serves them on subsequent
identical calls. Negative results (empty []) are never cached.
gh pr create populates the PR discovery cache immediately.

Also lifts PATH wrapper installation from individual agent plugins into
session-manager, making it universal for all agents including Claude Code:

- session-manager injects PATH + GH_PATH into every runtime.create()
- session-manager calls setupPathWrapperWorkspace() for all agents
- Removes duplicate buildAgentPath/setupPathWrapperWorkspace boilerplate
  from codex, aider, opencode, and cursor plugins

Includes D4 implementation plans in experiments/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 15:16:47 +05:30
..
out feat(experiments): add benchmark harness for GH rate-limit measurement 2026-04-17 03:10:11 +05:30
2026-04-14-etag-verification.md feat(core): add opt-in gh CLI tracer and migrate scm/tracker plugins 2026-04-14 20:44:23 +05:30
D4-ao-reduction-plan.md feat(core): add gh wrapper cache for PR discovery and issue context (D4) 2026-04-20 15:16:47 +05:30
D4-wrapper-cache-plan.md feat(core): add gh wrapper cache for PR discovery and issue context (D4) 2026-04-20 15:16:47 +05:30
DISCUSSION-NOTES.md docs(experiments): update plan and notes with B1 benchmark results 2026-04-17 16:58:33 +05:30
PLAN.md docs(experiments): update plan and notes with B1 benchmark results 2026-04-17 16:58:33 +05:30
a2-baseline-runbook.md fix(tracer): guard stderr/stdout against undefined, bound operation cardinality 2026-04-16 14:38:41 +05:30
analyze-trace.mjs fix(tracer): close A1b blockers 1-4 — graphql-batch visibility, operation naming, analyzer segmentation 2026-04-16 13:24:45 +05:30
ao-lifecycle-gh-cli-interactions.md feat(core): add opt-in gh CLI tracer and migrate scm/tracker plugins 2026-04-14 20:44:23 +05:30
baseline.md docs(experiments): add rate-limiting research artifacts 2026-04-17 03:10:04 +05:30
benchmark-plan.md feat(experiments): add benchmark harness for GH rate-limit measurement 2026-04-17 03:10:11 +05:30
benchmark-spec.md docs(experiments): add rate-limiting research artifacts 2026-04-17 03:10:04 +05:30
benchmark.mjs fix(scm-github): handle 304 Not Modified in ETag guard catch blocks (B1) 2026-04-17 13:22:23 +05:30
drill-tracer.mjs fix(tracer): close A1b blockers 1-4 — graphql-batch visibility, operation naming, analyzer segmentation 2026-04-16 13:24:45 +05:30
gh-etag-verification-experiment-codex.md feat(core): add opt-in gh CLI tracer and migrate scm/tracker plugins 2026-04-14 20:44:23 +05:30
gh-trace-harness.md feat(core): add opt-in gh CLI tracer and migrate scm/tracker plugins 2026-04-14 20:44:23 +05:30
refresh-ao-wrapper.mjs fix(core): preserve wrapper logging for dash-prefixed gh args 2026-04-19 14:30:30 +05:30
summarize-gh-trace.mjs fix(tracer): close A1b blockers 1-4 — graphql-batch visibility, operation naming, analyzer segmentation 2026-04-16 13:24:45 +05:30