Skip to content

Commit 6ef8f74

Browse files
jolestarjolestar
andauthored
skills: add legacy github-solve alias (#541)
* skills: alias github-solve to github-issue-solve and refresh builtin bundle * chore: keep builtin skills untracked --------- Co-authored-by: jolestar <host-user@example.com>
1 parent 81cc298 commit 6ef8f74

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

pkg/skills/catalog/builtin_catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"description": "Built-in Holon skill catalog with popular community skills",
44
"skills": [
55
{
6-
"name": "github-solve-community",
6+
"name": "github-issue-solve",
77
"url": "https://github.com/holon-run/holon/archive/refs/heads/main.zip",
8-
"description": "Community-curated GitHub issue resolution workflows",
8+
"description": "GitHub issue solve skill (default). Alias for legacy github-solve",
99
"version": "1.0.0"
1010
}
1111
]

pkg/skills/skills.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,16 @@ func NewResolver(workspace string) *Resolver {
7575
func (r *Resolver) Resolve(cliSkills []string, configSkills []string, specSkills []string) ([]Skill, error) {
7676
var skills []Skill
7777

78+
// Compatibility aliases for renamed skills
79+
alias := map[string]string{
80+
"github-solve": "github-issue-solve",
81+
}
82+
7883
// Add CLI skills (highest precedence)
7984
for _, ref := range cliSkills {
85+
if target, ok := alias[ref]; ok {
86+
ref = target
87+
}
8088
resolved, err := r.resolveSkillRef(ref, "cli")
8189
if err != nil {
8290
return nil, fmt.Errorf("invalid skill from CLI: %w", err)
@@ -86,6 +94,9 @@ func (r *Resolver) Resolve(cliSkills []string, configSkills []string, specSkills
8694

8795
// Add config skills
8896
for _, ref := range configSkills {
97+
if target, ok := alias[ref]; ok {
98+
ref = target
99+
}
89100
resolved, err := r.resolveSkillRef(ref, "config")
90101
if err != nil {
91102
return nil, fmt.Errorf("invalid skill from config: %w", err)
@@ -95,6 +106,9 @@ func (r *Resolver) Resolve(cliSkills []string, configSkills []string, specSkills
95106

96107
// Add spec skills
97108
for _, ref := range specSkills {
109+
if target, ok := alias[ref]; ok {
110+
ref = target
111+
}
98112
resolved, err := r.resolveSkillRef(ref, "spec")
99113
if err != nil {
100114
return nil, fmt.Errorf("invalid skill from spec: %w", err)

0 commit comments

Comments
 (0)