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:
m3ta-chiron committed 2026-11-05 08:48:52 +01:00
1 parent f37c3dce5e
commit d6821c6d7c
11 files changed
+472 -2

No files matched your search

+4 -2
View File
@@ -103,8 +103,10 @@ func checkCollisions(workDir string, lf *lockfile.Lockfile, source string, selec
seen := map[string]string{}
for _, it := range selected {
deployed := deployedName(it.UpstreamID, renames)
if deployed == "" {
return fmt.Errorf("source %q: rename of %q maps to an empty name", source, it.UpstreamID)
if deployed != it.UpstreamID {
if err := validateRenameTarget(it.Type, it.UpstreamID, deployed); err != nil {
return fmt.Errorf("source %q: %w", source, err)
}
}
if prev, dup := seen[deployed]; dup {
return &CollisionError{