feat(vendor): add rename command for deployed item names
- Add `vendor rename <source> [upstream-id=name ...] [--reset ids]` to change deployed names after `vendor add`, without moving the pinned rev or selection - Persist renames in the lockfile so they survive `vendor update` and `vendor select` - Rewrite SKILL.md frontmatter `name:` to the folder name so OpenCode loads renamed skills - Validate rename targets: single path segment, no leading dot, and OpenCode skill naming rules for skills - Re-run collision checks before writing; failed renames leave lockfile and external area untouched - Add unit tests for frontmatter rewrite and name validation, plus e2e rename coverage - Document renames in README; sync beads issue export
This commit is contained in:
1 parent
f37c3dce5e
commit
d6821c6d7c
11 files changed
+472
-2
No files matched your search
@@ -153,6 +153,32 @@ agent-lib vendor add superpowers "$URL" --rename review=superpowers-review
|
||||
The on-disk folder always carries exactly the deployed name. Renaming onto
|
||||
another collision is an error.
|
||||
|
||||
### Friendlier names for your users
|
||||
|
||||
Renames are not only for collisions — use them to give vendored items names
|
||||
your colleagues recognize. `vendor rename` changes them at any time, without
|
||||
moving the pinned revision or the selection:
|
||||
|
||||
```sh
|
||||
agent-lib vendor rename superpowers brainstorming=ideen-sammeln tdd=test-first
|
||||
agent-lib vendor rename superpowers --reset tdd # back to the upstream id
|
||||
agent-lib vendor rename superpowers # list current renames
|
||||
```
|
||||
|
||||
- The rename map lives in the lockfile and survives `vendor update` and
|
||||
`vendor select`.
|
||||
- A renamed skill gets the `name:` in its `SKILL.md` frontmatter rewritten to
|
||||
the new folder name (OpenCode requires both to match and shows that name).
|
||||
Commands and agents are renamed via their file name only.
|
||||
- Skill names must be 1–64 lowercase letters, digits and single hyphens
|
||||
(`code-review`, not `Code Review`). No name of any type may contain path
|
||||
separators or start with a dot.
|
||||
- Renaming an id that is not selected yet is allowed; it applies once the
|
||||
item is added via `vendor select --add`.
|
||||
- On the next `agent-lib sync`, clients receive the item under the new name;
|
||||
the old name is removed from their machine like any upstream deletion
|
||||
(locally modified copies stay, as usual).
|
||||
|
||||
### The maintenance loop
|
||||
|
||||
```sh
|
||||
|
||||
Reference in new issue
Block a user