Commit Graph

11 Commits

Author SHA1 Message Date
Oz 4b3668c60a Fail closed on an incomplete regen; add regression tests
Review of the previous revision found that pruning by checking whether
a copied path existed under the temp dir failed open: if skills add
exited 0 without actually copying anything (e.g. a broken CLI run),
every warpdotdev/common-skills entry looked stale and got deleted,
while the one entry from another source survived. That result is
worse than the original bug and would auto-merge into warp and
warp-server.

Restructure the fix: regenerate the warpdotdev/common-skills portion
of the lock from scratch in a clean, unseeded temp directory instead
of seeding it with the existing lock and pruning what didn't reappear.
skills add can then only ever emit entries for skills it actually
finds, so nothing stale can survive the merge in the first place.
Entries from any other source are carried over from the existing lock
unmodified. As a backstop, fail closed with a non-zero exit and leave
the existing lock untouched if regenerating produces no
warpdotdev/common-skills entries at all while the existing lock has
some - that is a sign the run didn't discover or copy anything, not
that every skill vanished upstream.

Add scripts/tests/update_common_skills_lock_test.sh, a self-contained
regression suite that runs the real script against a fake npx
(scripts/tests/fake-bin/npx) modeling `skills add ... --copy`
deterministically from a local fixture directory, with no network
access. Covers a rename, a plain deletion, foreign-source
preservation, idempotence, and the fail-closed guard. Wire it into a
new CI workflow that runs on push to main and on every pull request.

Co-Authored-By: Warp Agent <agent@warp.dev>
2026-08-13 15:45:21 +00:00
Oz 45958111e2 Reconcile stale entries when regenerating skills-lock.json
update_common_skills_lock seeded its temp dir from the existing
downstream lock and ran `skills add`, which merges into whatever lock
it finds but never removes an entry for a skill that no longer exists
in the source. A rename or deletion in warpdotdev/common-skills left a
ghost entry behind pointing at a skillPath that no longer exists.

Reconcile the candidate lock before comparing/copying it back: drop
any entry whose source is warpdotdev/common-skills unless this run's
`--copy` actually materialized its skillPath under the temp directory.
Entries from any other source, including hand-added ones, are left
untouched. This reuses the copy `skills add` already produced instead
of making a second fetch.

Fixes DEVX-8492.

Co-Authored-By: Warp Agent <agent@warp.dev>
2026-08-13 15:19:24 +00:00
David Stern bfb242ba4f Automate the process of creating PRs to update lockfiles in other repos. (#29)
* Automate the process of creating PRs to update lockfiles in other repos.

* update actions refs

* update README to mention recently-added skills
2026-06-22 13:02:07 -04:00
Zach Lloyd a50481aebb Skip common skills prompt when already up to date (#19)
Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-22 11:05:06 -06:00
Zach Lloyd 9c7302a2a7 Update install common skills flow (#17)
* Update install common skills flow

Co-Authored-By: Oz <oz-agent@warp.dev>

* Clarify CRLF hash normalization

Co-Authored-By: Oz <oz-agent@warp.dev>

* Clarify global lock mismatch guidance

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-22 10:17:18 -06:00
Zach Lloyd cf4f4f7c6b Add common skills script resolver (#13)
Recreate the resolver change from PR #12 on top of main so consuming repositories can load common-skills scripts through a shared resolver.

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-15 13:24:24 -06:00
Zach Lloyd 15142ef26b Add common skills management scripts (#10)
* Add common skills management scripts

Co-Authored-By: Oz <oz-agent@warp.dev>

* Install all common skills dynamically

Co-Authored-By: Oz <oz-agent@warp.dev>

* Share common skills script helpers

Co-Authored-By: Oz <oz-agent@warp.dev>

* Update common skills script structure

Co-Authored-By: Oz <oz-agent@warp.dev>

* Handle verify-only without lock file

Co-Authored-By: Oz <oz-agent@warp.dev>

* Refine common skills installer

Co-Authored-By: Oz <oz-agent@warp.dev>

* Add common skills repair helpers

Co-Authored-By: Oz <oz-agent@warp.dev>

* Add update-skill lockfile test marker

Co-Authored-By: Oz <oz-agent@warp.dev>

* Add common skills installer update path

Co-Authored-By: Oz <oz-agent@warp.dev>

* Refine common skills update workflow

Co-Authored-By: Oz <oz-agent@warp.dev>

* Run skills CLI non-interactively

Co-Authored-By: Oz <oz-agent@warp.dev>

* Remove common skills script dead code

Co-Authored-By: Oz <oz-agent@warp.dev>

* Document common skills client invocation

Co-Authored-By: Oz <oz-agent@warp.dev>

* Fix common skills lock restore flows

Ensure no-target non-interactive flows fail before attempting TTY prompts, and restore global common skills from a temporary lock checkout so restore paths do not rewrite the client repo lock.

Co-Authored-By: Oz <oz-agent@warp.dev>

* Validate common skills script dependencies

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-11 10:26:04 -06:00
Zach Lloyd 12d2e2b787 Use skills CLI for installation (#7)
Replace the custom install script documentation with npx skills usage and remove the legacy Bash and PowerShell installers.

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-06 10:54:43 -07:00
Zach Lloyd 63729ade41 Allow piped installer to prompt interactively (#6)
Support overriding the common-skills repository URL so callers can test or install from alternate remotes.

Make the Bash installer read overwrite prompts from the controlling terminal when invoked through bash with piped stdin, so callers like warpdotdev/warp script/bootstrap can invoke it interactively.

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-03 18:33:11 -06:00
Zach Lloyd be2ca370a2 Support custom skill install destination (#4)
* Support custom skill install destination

Co-Authored-By: Oz <oz-agent@warp.dev>

* Derive local skills destination from base directory

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-03 15:37:25 -06:00
Zach Lloyd 5f2be6d8f7 Add common skills install script (#2)
* Add common skills install script

Co-Authored-By: Oz <oz-agent@warp.dev>

* Prompt before overwriting installed skills

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
2026-05-03 13:53:32 -06:00