Skip to content

[agentic-token-optimizer] Design Decision Gate: skip agent on deterministic noop, downgrade model (~12 AIC/run) #66925

Description

@github-actions

Target workflow

Design Decision Gate 🏗️ (.github/workflows/design-decision-gate.md). It is the highest-AIC workflow in the 7-day window that was not excluded. Impeccable Skills Reviewer (optimized 2026-10-02) and Matt Pocock Skills Reviewer (2026-09-30) are above 14 days old only for the latter; both are heavier per run but lower-leverage than this gate, and PR Code Quality Reviewer was optimized 2026-10-07. Design Decision Gate was last optimized 2026-06-24.

Selection note: Impeccable and Matt Pocock were skipped because prior optimization work is recent or inconclusive; this is the next-highest candidate with a clear, deterministic saving.

Analysis period

Last 7 days, 6 runs analyzed (all pull_request, all success). Per-run turn counts are not reported in the log data (shown as 0).

Cost profile

Metric Value
Total AIC 102.14
Avg AIC / run 17.02
Raw tokens (total) 5,660
Avg raw tokens / run ~943
Avg duration ~9.6 min (62 action-minutes total)
Friction events 0

Five of six runs cost 13.4–14.6 AIC with only 450–485 raw tokens. The sixth cost 33.65 AIC with 3,330 tokens (a full ADR check). The near-constant ~13.4 AIC on near-empty token counts indicates a fixed per-invocation cost of the premium model (copilot/claude-opus-5) plus ~8–11 minutes of runner time, even when the agent does nothing but call noop.

Ranked recommendations

1. Skip the agent job when the deterministic gate says "noop" (est. 13 AIC/run on noop runs, ~75–80% of total)

The prompt's Step 1 is fully deterministic (skip_reason, has_implementation_label, requires_adr_by_default_volume), and all of those values are already computed in the pre-fetch step adr-prefetch-summary.json. Yet the agent is still launched, which reads the file and calls noop.

  • Action: have the pre-fetch step emit a step output (e.g. needs_gate=true|false) and gate the agent on it, via an if: on the activation job or a skip-if style pre-activation check. Keep the .design-gate.yml custom-config case in the agent (or recompute in the script), since the prompt requires recomputation then.
  • Evidence: 5 of 6 runs (~13.4 AIC, ~450 tokens each) match the noop-only profile.
  • Estimated: ~13 AIC saved on each noop run, ≈ 65–70 AIC per week at the current volume.

2. Use a cheaper model for the gate (est. 5–10 AIC/run on non-noop runs)

Model is pinned to copilot/claude-opus-5 for a task that is extractive/comparative: read a diff, check ADR sections, write a templated comment. Try a mid-tier model and compare output via the existing evals. Keep Opus only as an escalation if evals regress.

  • Evidence: the only non-noop run cost 33.65 AIC for 3,330 tokens, so cost is dominated by model rate, not volume.

3. Trim the prompt's turn-budget scaffolding (est. 1–2 AIC/run)

max-turns: 30 in frontmatter, "20 turns maximum" in the prompt, and a turn-budget table plus a long Stopping Criteria and Efficiency Rules section restate each other. Collapse to one short stopping list and align max-turns with the 7-turn expected path (e.g. 12). The Step 1 text duplicates the Stopping Criteria noop condition and can be shortened to a single reference.

4. Reduce bash: ["*"] and github toolset scope (reliability/safety, small savings)

Observed usage in the sampled data shows no github MCP calls from this workflow beyond optional linked-issue lookup. Consider narrowing bash to the find/cat calls the prompt uses and toolsets to [pull_requests, issues] only if retained. Do not remove the github tool entirely (the prompt has fallbacks that use it). Lower priority; no measurable AIC claim.

Structural optimizations

  • Common setup prefix: not warranted; the pre-fetch is already a deterministic steps: block.
  • Inline sub-agents: not recommended. The workflow ends in a single authoritative comment and has few independent sections.

Estimated savings

~13 AIC on noop runs and ~5–10 AIC on gate runs; blended ≈ 12 AIC/run (~70% of the 7-day total).

Caveats

  • Only 6 runs, one non-noop; turn counts and per-tool usage per run are not in the pre-aggregated data, and the mcp_tool_usage summary is aggregated across all workflows, so it could not be attributed to this one.
  • Skipping the agent also removes the run-started/run-success status messages on noop PRs; confirm that is acceptable.
  • Model downgrade must be validated against the workflow's evals before rollout.

References: §37795079238, §37794614392, §37792119519

Generated by Agentic Workflow AIC Usage Optimizer · copilot · auto · 22.5 AIC · ⊞ 10.8K · ◷

  • expires on Oct 15, 2026, 7:01 AM UTC-08:00

Activity

  1. github-actions commented on Oct 9, 2026

    @github-actions
    ContributorAuthor

    This issue is being closed as outdated. A newer issue has been created: #67220

    View newer issue


    This action was performed automatically by the Agentic Workflow AIC Usage Optimizer workflow.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions