Skip to content

gh aw upgrade writes a dispatcher skill that tracks main instead of the installed CLI version #77390

Backlog

Description

@MattSkala

Summary

The dispatcher skill written by gh aw upgrade / init / fix is tied to main, not to the CLI release that generates it. A repository pinned to a stable release ends up with a skill that lists and links prompts written for unreleased versions.

What happens

In pkg/cli/copilot_agents.go (checked at v1.0.1 and current main):

  • The .github/aw/*.md file list is fetched at upgrade time from a hardcoded main ref:
    https://api.github.com/repos/github/gh-aw/contents/.github/aw?ref=main
    (the raw fallback URL is also on main).
  • The embedded template data/agentic_workflows_skill.md hardcodes prompt URLs as
    https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/....

The skill text says the main URLs "are defaults only when no guidance revision is supplied", but nothing in upgrade supplies one, so agents always load from main.

Reproduction

  1. Install the latest stable release (v1.0.1 at the time of writing; main is at the v1.2.x pre-releases).
  2. Run gh aw upgrade in a repository on separate days without changing the CLI version.
  3. .github/skills/agentic-workflows/SKILL.md changes whenever a prompt file is added to or removed from main.

Example: with the CLI unchanged at v1.0.1, the skill gained otel.md, dreaming.md, squad.md and index-search.md. All four return 404 at the v1.0.1 tag:

gh api 'repos/github/gh-aw/contents/.github/aw/dreaming.md?ref=v1.0.1'   # 404

Why it matters

  • Version skew: agents follow prompts that can describe frontmatter, commands or features the installed compiler does not support.
  • Non-reproducible output: the same CLI version produces different skill content depending on the day it runs.
  • Churn: repositories that run gh aw upgrade on a schedule get skill-only PRs unrelated to any release.

Proposed behavior

For release builds, use the binary's own version tag as the guidance ref:

  • fetch the .github/aw file list at that tag (or use the embedded list, which already matches the release), and
  • render the prompt URLs in the skill and agent templates with that tag instead of main.

Dev builds can keep main. An opt-in flag (for example --guidance-ref main) would cover users who want the latest prompts.

Environment

  • gh aw version: v1.0.1
  • Installed with gh extension install github/gh-aw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions