Skip to content

refactor: compress squad.md workflow prompt from 110K to <30K chars (hybrid approach) #1684

Closed

Description

@bradygaster

Problem

workflows/squad.md is 2682 lines / 110K chars (~30K tokens). With imports adding 25K more, the gh-aw runtime agent is overwhelmed. All modes except Cast (near top of file) are non-functional — the agent burns 65-93 AIC producing zero useful output.

Decision

Hybrid compression (see .squad/decisions/inbox/copilot-workflow-prompt-compression.md):

  • Compress shared preamble to ~120 lines (imperative shorthand, no prose rationale)
  • Compress each mode section to 50-100 lines (from 300-500)
  • Cut verbose output templates → terse field lists
  • Consolidate repeated prohibitions into one shared rule block
  • Target: <900 lines / <30K chars for squad.md, <50K chars total with imports

Why Not Alternatives

Option Why rejected
Conditional imports imports: is static YAML array — no conditional logic in gh-aw
Single-file <800 lines 19 modes cannot fit meaningfully — sacrifices correctness
Mode-per-workflow Requires multiple gh aw add — violates single-install constraint

Acceptance Criteria

  • All 19 modes produce correct output
  • Total prompt (squad.md + imports) under 15K tokens
  • Single gh aw add still installs everything
  • Cast mode quality unchanged
  • Research, Triage, Plan modes functional (currently broken)

Approach

  1. Inventory each mode section — identify cut vs compress candidates
  2. Write compressed version iteratively (mode by mode)
  3. Test each mode against known-good inputs
  4. Measure final token count

/cc @bradygaster

Activity

  1. added
    squadSquad triage inbox — Lead will assign to a member
    on Aug 11, 2026
  2. github-actions commented on Aug 11, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #1684 — refactor: compress squad.md workflow prompt from 110K to <30K chars (hybrid approach)
    Assigned to: FIDO (Quality Owner)
    Reason: Issue relates to testing/quality work

    @copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

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

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a member

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions