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
Vendored
+3
@@ -310,6 +310,9 @@ func materialize(workDir, name string, tree discovery.Tree, selected []discovery
|
||||
case lockfile.TypeSkill:
|
||||
dst = filepath.Join(base, dep)
|
||||
err = deploy.Dir(tree, it.RelPath, dst)
|
||||
if err == nil && dep != it.UpstreamID {
|
||||
err = rewriteSkillName(dst, dep)
|
||||
}
|
||||
default:
|
||||
dst = filepath.Join(base, dep+filepath.Ext(it.RelPath))
|
||||
err = deploy.File(tree, it.RelPath, dst)
|
||||
|
||||
Reference in new issue
Block a user