fix(install)!: delegate gh skills to GitHub CLI - #3277
Draft
austintraver wants to merge 7 commits into
Draft
austintraver wants to merge 7 commits into
austintraver wants to merge 7 commits into
Conversation
Use gh skill install for file deployment, provenance, and native installed state instead of writing incompatible frontmatter and a Rulesync gh lock. Keep source declarations, route explicit refs through skill@ref, and use read-only gh tree discovery for the existing all-skills-at-ref layout. Ignore legacy lockfiles and document reinstallation and cleanup. Reject update/frozen flags with native-update and fixed-revision guidance rather than promising a lock that re-resolves moving refs. Exercise the real CLI against an advancing GitHub source in an opt-in integration test. BREAKING CHANGE: gh mode requires GitHub CLI and delegates installed state; --update and --frozen are no longer supported in gh mode. Agent-Session: Codex 01a0fdab-8bab-7953-bb23-ad125b2e03d4 Agent-Host: hoenn
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Documented skills: ["*"] declarations are forwarded as a literal selector and fail instead of installing all skills.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Delegates gh-mode skill installation and provenance management to GitHub CLI, replacing Rulesync’s legacy installer and lockfile.
Changes:
- Invokes
gh skill install --forcefor declared sources. - Removes legacy gh path, metadata, and lockfile handling.
- Documents migration, update, and frozen-mode behavior.
| File | Description |
|---|---|
src/lib/npm-sources-lock.ts |
Updates lockfile documentation. |
src/lib/gh/gh-paths.ts |
Removes legacy path mapping. |
src/lib/gh/gh-paths.test.ts |
Removes path mapping tests. |
src/lib/gh/gh-lock.ts |
Removes Rulesync gh lockfile support. |
src/lib/gh/gh-lock.test.ts |
Removes gh lockfile tests. |
src/lib/gh/gh-install.user-scope.test.ts |
Removes legacy user-scope tests. |
src/lib/gh/gh-install.ts |
Delegates installation to GitHub CLI. |
src/lib/gh/gh-install.test.ts |
Tests subprocess delegation and migration. |
src/lib/gh/gh-frontmatter.ts |
Removes custom provenance injection. |
src/lib/gh/gh-frontmatter.test.ts |
Removes frontmatter tests. |
src/generated/docs-content.ts |
Regenerates installation documentation. |
src/config/config.ts |
Allows GitHub CLI-defined agent IDs. |
src/cli/program.ts |
Clarifies unsupported gh-mode flags. |
src/cli/commands/install.ts |
Updates gh-mode command handling. |
src/cli/commands/install.test.ts |
Updates command tests. |
src/cli/commands/install-gh.integration.test.ts |
Adds real GitHub CLI integration coverage. |
docs/guide/declarative-sources.md |
Documents delegation and migration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
austintraver
marked this pull request as draft
October 2, 2026 18:22
Infer argv and environment assertions from one typed mock instead of repeated any casts. Keep test behavior unchanged. Agent-Session: Codex 01a0fdab-8bab-7953-bb23-ad125b2e03d4 Agent-Host: hoenn
Remove the file-existence check and warning. The installer has no reason to know the old lock filename; migration remains documented and a regression test proves an invalid legacy lock has no effect. Agent-Session: Codex 01a0fdab-8bab-7953-bb23-ad125b2e03d4 Agent-Host: hoenn
Treat the documented "*" selector as all skills before invoking GitHub CLI, using native --all or explicit-ref discovery as appropriate. Cover both routes with subprocess regressions and the real branch-advancement integration test. Preserve the current update and frozen flag behavior. Validation: 16 adapter tests, real gh 2.102.0 integration test, typecheck, formatting, and lint pass. The live test confirms native list metadata, dry-run discovery, and successful updates after a GitHub source advances. Agent-Session: Codex 01a0fdab-8bab-7953-bb23-ad125b2e03d4 Agent-Host: hoenn
Pass --force only when requested. Let gh use the existing terminal through inherited stdio, while capturing output for JSON and silent invocations. Keep --update and --frozen unsupported and document explicit forced migration. Verify fresh and repeated installs, legacy migration, and native list/update against gh 2.102.0 with isolated homes. Real terminal checks cover declining, accepting, and forcing overwrite; focused regressions pass. Agent-Session: Codex 01a0fdab-8bab-7953-bb23-ad125b2e03d4 Agent-Host: hoenn
austintraver
marked this pull request as ready for review
October 3, 2026 02:12
Contributor
Author
|
|
| ...(skill ? [] : ["--all"]), | ||
| "--", | ||
| `https://github.com/${source.owner}/${source.repo}`, | ||
| ...(skill ? [source.ref ? `${skill}@${source.ref}` : skill] : []), |
austintraver
marked this pull request as draft
October 3, 2026 05:39
This branch has not been deployed
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.

Skills installed by gh mode appeared in
gh skill list, but their source/version were blank andgh skill updateskipped them: Rulesync wrote top-level fields where gh expectsmetadata.github-*. This follows up on #1524 and #1533.This change delegates installation to GitHub CLI so its preview implementation owns skill metadata and updates.
rulesync.jsonc.sourcesremains the declaration; Rulesync no longer reads or writesrulesync-gh.lock.yaml.With
--force, repeated installation overwrites existing skills with the configured source version. This refreshes branch contents before a release and exact-path skills that gh update cannot rediscover. Without it, gh retains its normal overwrite confirmation/error behavior.Rulesync's lockfile flags now report errors in gh mode:
--updatepreviously refreshed the Rulesync lock. Without that lock, callers explicitly choose forced installation of their declared branch or native gh update, which can select a release instead.--frozencannot retain its locked-install guarantee: gh has no equivalent operation, and downloading a moving branch again can change the installed files.Migration uses
rulesync install --mode gh --force, native list/update verification, and removal of the obsolete lock. The guide covers preserving an old revision and leftover files.Real gh 2.102.0 tests verified source/version reporting, dry-run behavior, updates after the source advanced, and overwrite behavior in terminals and scripts. All five upstream CI checks pass, including Ubuntu, macOS, and Windows E2E tests.