Skip to content

workflows/squad.md is ~37 bytes from the prompt-budget floor — the next change to it fails CI on byte count alone #1842

Closed

Description

@bradygaster

Measured

test/gh-aw-quality.test.ts → gh-aw: prompt budget & planning import regression → reports combined bytes and headroom asserts at least 5 KB of headroom under a 100 KB prompt ceiling:

).toBeGreaterThan(5 * 1024);

On dev at 4b32f7be, that gate passes with roughly 5157 bytes of headroom — about 37 bytes above the 5120-byte floor.

Why this is a blocker, not a nit

Discovered while fixing #1835, which needed a ~18-byte change to one awk one-liner in workflows/squad.md. Measured cost of each attempt:

Change Headroom Gate
Baseline (dev) ~5157 ✅
Fix + 5-line explanatory paragraph 4823 ❌
Fix + 2-line note 5040 ❌
Fix + 1-line note, compacted awk 5092 ❌
Fix + 4-word note, compacted awk ~5155 ✅

To land an 18-byte behavioral fix I had to:

  1. strip inter-statement spaces from the awk program, hurting readability of the exact line most likely to be reread during an incident, and
  2. delete the prose explaining why the line is shaped that way.

That is the budget dictating code style and deleting rationale. Both are load-bearing in a file that is the prompt.

The compounding part

workflows/squad.md is the /squad coordinator prompt. Nearly every open gh-aw item edits it — #1801 (plan validation), #1780 (ontology drift next-hints), #1730 (issue-scoped concurrency + actor authorization), #1757 (adversarial plan validate), #1608 (richer squad.agent.md). Each will hit this wall, and each author will independently rediscover it, then pay for bytes by deleting explanation. The file gets progressively less legible precisely as it gets more complex.

PR #1841 leaves headroom at roughly 65 bytes.

Not a proposal, but the shape of the options

  • Raise the floor / ceiling if 100 KB no longer reflects the real model limit — needs someone to confirm what the true constraint is, since a gate nobody can satisfy is worse than no gate.
  • Reclaim bytes by extracting stable reference material out of the prompt (the shell-input security contract pasted in during fix(gh-aw): fail loudly when /squad parses no command (#1824) #1832 is a candidate).
  • Split the coordinator prompt, if gh-aw supports composition.
  • Report headroom as a warning below a threshold and fail only at the true ceiling, so the gate stops being a hard stop for correct changes.

Whichever way it goes, the current state means a correct, tested, minimal fix can fail CI purely on byte count, which is what happened in #1841.

Acceptance

  1. A ~20-line prose addition to workflows/squad.md can land without failing reports combined bytes and headroom.
  2. The awk one-liners in PC-0 and PC-1 can carry readable inter-statement spacing.
  3. Whatever ceiling is chosen is justified against the actual model/runner limit rather than inherited.

Found in: #1841 (fixing #1835).

Activity

  1. added
    bugSomething isn't working
    gh-awGitHub Agentic Workflows integration
    on Aug 23, 2026
  2. bradygaster commented on Aug 23, 2026

    @bradygaster
    CollaboratorAuthor

    Two corrections + one resolved unknown

    1. Acceptance criterion 3 is answered: the 100 KB ceiling is real, not inherited

    This issue asks that the ceiling be "justified against the actual model/runner limit rather than inherited." It is a genuine gh-aw limit. CHANGELOG.md:28 records the original compression work:

    prompt-size compression (135KB -> under the 100KB gh-aw limit)

    So raising the ceiling is not on the table. Only three levers remain: trim the prompt, lower the 5 KB guard, or move content out of the assembled set.

    2. The byte numbers in the description are wrong

    Measured against current origin/dev:

    ref total headroom spare over the 5120 floor
    origin/dev 97,207 5,193 73
    #1841 head 97,254 5,146 26

    The description says ~37 and ~65. Actual is 73 and 26 — so #1841 is tighter than recorded, not looser.

    3. Measurement gotcha that will mislead the next person

    Do not measure the working tree on Windows. CRLF adds ~1 byte per line across ~1,900 lines, which reports ~99,347 total / ~3,053 headroom and makes it look like CI is already failing. It is not. CI reads LF.

    Always measure git blob bytes:

    for f in workflows/squad.md workflows/shared/squad.md \
             workflows/shared/squad-planning-ontology.md \
             workflows/shared/squad-planning-policy.md; do
      git cat-file -s "origin/dev:$f"
    done | paste -sd+ | bc

    Also note the import paths are workflows/shared/*, not shared/* — the frontmatter values are resolved relative to WORKFLOWS_DIR (gh-aw-quality.test.ts:641).

    4. Inline skills do not help here

    Worth stating so it is not attempted as a fix: the 100 KB ceiling counts all of workflows/squad.md, inline skills included. Moving prose into an inline skill relieves only the separate 40 KB AMBIENT_BUDGET_BYTES gate (gh-aw-quality.test.ts:851), not this one.

  3. added a commit that references this issue on Aug 25, 2026
    99afdda
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

    bugSomething isn't workinggh-awGitHub Agentic Workflows integrationpriority:p0Blocking releasetriagedIssue has been triagedtype:bugSomething brokenwave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions