fix: keep the installable skill as a CLI-deferring stub - #118
Merged
Conversation
Installed copies of SKILL.md go stale when gh-axi's help changes. Generate only identity, when-to-use, and pointers at the live CLI so regeneration cannot re-inflate command, flag, or workflow instructions. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix gh-axi's skill-fragmentation problem: cut skills/gh-axi/SKILL.md DRASTICALLY to a minimal stub that defers to the CLI as the single source of truth, via the GENERATOR so the contract holds on every regeneration. This is the same minimal-stub pattern the captain approved for lavish-axi, applied family-wide.
The problem: skills/gh-axi/SKILL.md DUPLICATES instructions the gh-axi CLI already prints (help / subcommand / dashboard output). That fragments the guidance and goes STALE: users install the skill once and never update it when they bump the gh-axi npm package, so the skill's baked copy drifts from the current CLI. MODERATE: the skill already opens with what-it-is + when-to-use + a defer line, but it ALSO bakes a ## Commands index (commands[16]), a long ## Tips flag-detail section, and exact-syntax ## Workflow steps that mirror the CLI dashboard/--help and drift when commands or flags change.
CRITICAL: fix the GENERATOR, not just the output. skills/gh-axi/SKILL.md is GENERATED from src/skill.ts via scripts/build-skill.ts (pnpm run build:skill; CI runs pnpm run build:skill -- --check and fails on drift). VERIFY the exact generator source and generated output path first, then fix the GENERATOR so the minimal-stub contract holds on EVERY regeneration - not just the current output. Then run pnpm run build:skill to regenerate and confirm -- --check is green.
Intent: Cut the skill BODY to a minimal stub. KEEP the frontmatter (name/description/metadata - that is the skill's identity and discovery surface) and keep ONLY: what gh-axi is (one or two lines), when to reach for it, and - for any actual instructions - a pointer telling the agent to GET them from the CLI:
npx -y gh-axi(dashboard),npx -y gh-axi --help, andnpx -y gh-axi <command> --helpfor per-command usage. REMOVE the ## Commands index block, the ## Tips flag-detail section, and the exact-syntax duplication in ## Workflow. The CLI output becomes the SINGLE SOURCE OF TRUTH so a stale installed skill cannot drift - it just points at the always-current CLI.Also: document the contract in gh-axi's AGENTS.md. Add a concise note: the shipped skill stays MINIMAL and DEFERS to the CLI for all actual guidance (gh-axi CLI output is the single source of truth); never re-duplicate CLI-owned instructions into the skill again. Prefer a pointer over restated detail.
Acceptance criteria:
npx -y gh-axi(dashboard),npx -y gh-axi --help, andnpx -y gh-axi <command> --helpfor per-command usage. NO baked CLI-owned instruction content remains.Do not merge the PR; the captain merges and decides the release. No Greptile on gh-axi.
What Changed
Risk Assessment
✅ Low: The change is narrowly scoped, preserves the CLI guidance, and makes the generated skill a minimal CLI-deferring stub consistent with the stated intent.
Testing
Installed locked dependencies, regenerated and drift-checked the minimal skill, exercised its focused generated-output contract, and manually verified the real CLI dashboard plus global and issue help remain comprehensive as the source of truth. The generated skill and CLI transcript were captured as reviewer-visible evidence.
Evidence: CLI dashboard, global help, and per-command help transcript
Source: CLI dashboard, global help, and per-command help transcript
Evidence: Final generated minimal gh-axi skill
Source: Final generated minimal gh-axi skill
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
pnpm install --frozen-lockfilepnpm run build:skillpnpm run build:skill -- --checkpnpm exec vitest run test/skill.test.tspnpm exec tsx bin/gh-axi.ts --helppnpm exec tsx bin/gh-axi.ts issue --helppnpm exec tsx bin/gh-axi.ts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.