Conversation
Implement SPEC.4: Upgrade and Catalog Versioning. Adds `vlurp upgrade` as a first-class command that combines outdated detection, selective re-fetching, vlurpfile rewriting, and structured catalog diffing into a single atomic operation. No lifecycle hooks, no code execution — the catalog is derived from content on disk by vlurp's own code. Phase 1 — Vlurpfile writer: `updateRef()` and `updateRefs()` perform structure-preserving edits to .vlurpfile content, updating or inserting `--ref` values while preserving comments, blank lines, and argument ordering. Phase 2 — Upgrade command: `vlurp upgrade [source]` resolves upstream HEAD for each source, re-fetches outdated entries, writes lineage, and rewrites the .vlurpfile with new refs. Supports `--dry-run` and `--vlurpfile` flags. Phase 3 — Catalog diff: `vlurp catalog-diff [old] [new]` computes a structured comparison of two catalog snapshots, reporting new, removed, changed, and unchanged skills with tool/command/file surface deltas. Supports `--json` for machine-readable output. Phase 4 — Catalog in upgrade output: `vlurp upgrade` snapshots catalogs before and after fetching, diffs them, and renders the structured changelog inline. Saves `catalog.prev.json` for subsequent diffing. Extracts `buildCatalog()` from the catalog command into a reusable module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
What
Adds
vlurp upgrade [source]as a first-class command that combines outdated detection, selective re-fetching,.vlurpfilerewriting, and structured catalog diffing into a single atomic operation. Also addsvlurp catalog-diff [old] [new]for standalone catalog comparison with both human-readable and--jsonoutput.The implementation spans four phases: a structure-preserving vlurpfile writer (
updateRef(),updateRefs()insrc/vlurpfile.js), the upgrade command itself (src/commands/upgrade.js), pure catalog diff logic (src/catalog-diff.jswithdiffCatalogs()andformatCatalogDiff()), and catalog integration into the upgrade output — snapshots before/after, diffs them inline, and rotatescatalog.json→catalog.prev.json. The catalog-building logic was extracted from theCatalogCommandInk component into a reusablebuildCatalog()function insrc/catalog.js.The
versionfield is now extracted from SKILL.md YAML frontmatter and included in the catalog schema, enabling version-aware diffing that reports skill additions, removals, version bumps, and tool/command/file surface area deltas.Why
The skill pack ecosystem has two distribution models: git-clone-as-package-manager (gstack's approach:
git reset --hard origin/main && ./setup) and tarball-fetch-with-filtering (vlurp's approach). vlurp had better security properties — lineage tracking, integrity verification, content scanning — but no upgrade story. Users had to manually runvlurp outdated+vlurp pin+vlurp batch --forceas separate steps, with no structured view of what changed.The gstack model's problem
gstack's upgrade runs
./setupafter every pull — a shell script that compiles a Bun binary and creates symlinks. This is an npmpostinstallscript by another name. The upstream repo author decides what code runs on the consumer's machine. The same supply chain attack vector that madenpm installdangerous. gstack also usesCHANGELOG.mdsummarized by an LLM to show "what's new" — optional, lossy, and not machine-readable.How this fixes it
vlurp upgradetreats upgrading as fetching with better UX. No lifecycle hooks. No code execution. The catalog is derived from content on disk by vlurp's own trusted code. The catalog diff is deterministic and exact — a new tool intool_surfaceshows up as+Bash, a removed skill shows up as(removed). No LLM summarization, no author discipline required, and--jsonoutput is directly consumable by CI pipelines.The vlurpfile writer preserves the human-authored structure (comments, blank lines, argument ordering) while updating
--refvalues in-place, making.vlurpfilefunction as a lockfile that's both human-readable and machine-updatable.Risk Assessment
Low risk. All changes are additive — two new commands (
upgrade,catalog-diff), two new modules (src/catalog.js,src/catalog-diff.js), and extensions to existing modules. TheCatalogCommandrefactor extracts logic intobuildCatalog()without changing behavior. The vlurpfile writer operates on string content and does not touch the filesystem directly. Existing commands are unchanged.Future Work
vlurp upgrade --dry-runcould fetch to a temp directory and show a catalog diff preview (currently only shows outdated/current status)vlurp scanto highlight new security findings in upgraded content