Skip to content

Add skill version pinning via git tags and commit SHAs#73

Merged
albertodebortoli merged 2 commits intomainfrom
feat/skill-version-pinning
Apr 18, 2026
Merged

Add skill version pinning via git tags and commit SHAs#73
albertodebortoli merged 2 commits intomainfrom
feat/skill-version-pinning

Conversation

@albertodebortoli
Copy link
Copy Markdown
Member

@albertodebortoli albertodebortoli commented Apr 16, 2026

Description

  • Adds an optional ref: field to skill definitions in Lucafile, allowing skills to be pinned to a specific git tag (e.g. v1.2.0) or commit SHA1 (e.g. abc1234)
  • Adds --ref flag to luca install for individual skill installs
  • When no ref is specified, existing HEAD behaviour is preserved
  • Tags and branches use shallow clone (--depth 1 --branch <ref>); commit SHAs use a full clone followed by git checkout <sha>
  • Closes no open issue (new feature)
skills:
  - name: frontend-design
    repository: vercel-labs/agent-skills
    ref: v1.2.0         # git tag
  - name: my-skill
    repository: owner/repo
    ref: abc1234        # commit SHA

Type of Change

  • Feature

How Has This Been Tested?

  • Added / updated unit tests
  • Swift code builds locally (swift build)
  • Tests pass locally (swift test) — 371 tests, all passing

New tests added:

  • GitRepositorySkillFetcherTests: 5 new cases covering tag cloning, SHA checkout, checkout failure, cache key isolation per ref
  • SkillsInfoFactoryTests: 4 new cases covering ref propagation to SkillSet, first-ref-wins for same-repo skills, and --ref on individual installs
  • ErrorDescriptionTests: coverage for new checkoutFailed error case
  • New fixture: Lucafile_mock_with_versioned_skills.yml

Checklist

  • Swift code builds locally (swift build)
  • Tests pass locally (swift test)
  • Code style / formatting respected
  • Documentation updated (DocC comments on new fields, Lucafile example updated)

Breaking Changes?

  • No — ref defaults to nil on all models; all existing Lucafiles and call sites are unaffected

Skills can now be pinned to a specific git ref (tag or commit SHA1) via
a `version:` field in the Lucafile and a `--ref` flag for individual installs.
Tags use shallow clone with `--branch`; commit SHAs use full clone + checkout.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@albertodebortoli albertodebortoli marked this pull request as draft April 16, 2026 22:47
@albertodebortoli albertodebortoli added the feature New feature or enhancement label Apr 16, 2026
@albertodebortoli albertodebortoli added this to the 0.17.0 milestone Apr 16, 2026
Covers the clone-fails-during-SHA-fetch path in GitRepositorySkillFetcher
and the checkoutFailed → cloneFailed mapping in SkillDownloader.
@albertodebortoli albertodebortoli marked this pull request as ready for review April 18, 2026 08:12
@albertodebortoli albertodebortoli merged commit 275ce54 into main Apr 18, 2026
3 checks passed
@albertodebortoli albertodebortoli deleted the feat/skill-version-pinning branch April 18, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant