Skip to content

[agentic-token-optimizer] Prompt verbosity reduction for Release workflow #72

@github-actions

Description

@github-actions

Target Workflow

Release (workflows/release.md) — the only non-Token, agent-based workflow not yet ineligible after applying the 14-day exclusion rule to all pure-CI and maintenance workflows. Selected because it has a prompt-heavy structure with clear consolidation opportunities.

Note: All workflows in the optimization log were audited within the past 14 days. No pre-aggregated token data was available in the 7-day window (all snapshots contain zero completed agentic runs). The analysis below is based on prompt structure and GitHub Actions run-level timing.


Analysis Period & Runs

Attribute Value
Period 2026-05-14 → 2026-05-21 (7 days)
Runs audited 2
Conclusions 2 × success (100%)
Errors / Warnings 0 / 0
Avg agent job duration ~2 min 10 s
Estimated turns/run 2–4

References: §26163733067 · §25873066389


Token Profile

Token-level telemetry was not available in the pre-downloaded log data. Estimates below are derived from prompt line counts and observed agent durations.

Metric Estimate
Prompt body size ~129 lines / ~2,100 tokens
"What to Write" section 105 lines (81% of prompt)
Avg tokens/run (estimated) ~3,500–5,000
Cache efficiency Unknown (short runs suggest warm cache likely)
Runs/week ~2

Ranked Recommendations

1 · Merge redundant writing-rule subsections — Est. –500 tokens/run

Problem: The ## What to Write section (105 lines) contains three subsections that heavily overlap:

  • Release-note anti-patterns to avoid (6 bullets)
  • Writing quality constraints (5 bullets)
  • Exclude internal-only changes unless they materially affect users (6 bullets)

All three convey the same core directive: focus on user-visible impact; omit internal housekeeping. The redundancy trains the model to re-process the same constraint in three passes, inflating input tokens with no added precision.

Action: Collapse all three into a single ### Writing rules block of 5–6 bullets, removing ~35 lines (~560 tokens).

Example collapsed block:

### Writing rules
- Focus on user-visible impact (behavior, capability, compatibility, cost). Omit CI, build, test, and internal housekeeping.
- Prefer one synthesized bullet over several low-value commit-level bullets.
- Start each bullet with the outcome; add condition/scope after.
- Avoid vague filler ("various fixes"), hype, and contributor mentions.
- Do not repeat the same fact across Highlights and Upgrade Notes.

Evidence: Lines 91–129 of release.md (anti-patterns + quality + exclude sections) are functionally equivalent to the above 5 bullets.


2 · Condense semver guidance — Est. –150 tokens/run

Problem: The semver block (~15 lines) gives separate prose guidance for major, minor, patch, and 0.y.z releases. For a changelog-generation task driven by a concrete diff, the distinction between minor and patch rarely changes the agent's behavior beyond tone — the diff is the primary signal.

Action: Reduce to a 4-line rule:

Infer scope from the tag (major/minor/patch) and the diff. Call out breaking changes for major; capabilities for minor; fixes for patch. For 0.y.z, still name any breakage plainly.

Saves ~11 lines (~175 tokens).


3 · Compress the selection rubric — Est. –100 tokens/run

Problem: The include/exclude selection rubric (6 bullets, ~10 lines) is wordy and partially duplicates the writing rules.

Action: Reduce to 2–3 tight bullets:

Include: anything a user notices by using, configuring, upgrading, or debugging the workflow.
Omit: CI, build, test, refactoring, internal plumbing, and generated-file updates.
Collapse related low-level commits into one user-facing outcome.

Saves ~7 lines (~110 tokens).


Structural analysis: inline sub-agent candidates

The Release prompt has 3 major sections (Data Available, What to Write, Output Requirements) with no existing ## agent: blocks. Sub-agent scoring:

Section Independence Small-model Parallelism Size Total
Read & summarize diff files 3 2 2 1 8
Generate release notes 1 1 0 2 4
Update CHANGELOG.md 2 2 1 1 6

Diff summarization (score 8): Reading commit_subjects.tsv and changed_files.txt and producing a structured impact summary is extractive and classification-based — strong fit for a smaller model. However, the workflow runs only ~2×/week, making the overhead of an agent call less justifiable. Not recommended at current frequency.

CHANGELOG update (score 6): Sequential on the notes output; cannot run concurrently. Keep in main agent.

Verdict: No sub-agent additions recommended for the Release workflow at this time. Revisit if run frequency increases.


Caveats

  • Only 2 runs were available for analysis; behavior on large diffs (many commits, many changed files) may differ.
  • Token telemetry was unavailable — savings estimates are derived from prompt line-count proxies (~16 tokens/line average).
  • The Release workflow is manually triggered and low-frequency; absolute weekly savings are modest. The primary benefit of these changes is prompt clarity and faster future iterations.

Generated by Agentic Workflow Token Usage Optimizer · ● 11.2M ·

  • expires on May 28, 2026, 3:43 PM UTC

Metadata

Metadata

Assignees

No one assigned

    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