topdata: stop hardcoding the skills dataset location
The skills dataset moved into a tree (skills/core, skills/specs, ...).
Resolve it data-driven instead of by name:
- The required-family check no longer pins skill focus families to
dataset "skills"; the family spec's child_source names the dataset.
- Affinity generation and display names use the skill_focus spec's
child_source dataset.
- Child slugs derive from the row key's own namespace (text after the
first colon) instead of assuming namespace == dataset path.
- The wiki loader accepts both layouts ("skills", then "skills/core").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -569,11 +569,13 @@ func loadWikiContext(dataDir, sourceDir string) (*wikiContext, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
loadBase := func(name string) (nativeCollectedDataset, bool, error) {
|
||||
for _, dataset := range datasets {
|
||||
if dataset.Name == name {
|
||||
collected, err := collectNativeDataset(dataset)
|
||||
return collected, true, err
|
||||
loadBase := func(names ...string) (nativeCollectedDataset, bool, error) {
|
||||
for _, name := range names {
|
||||
for _, dataset := range datasets {
|
||||
if dataset.Name == name {
|
||||
collected, err := collectNativeDataset(dataset)
|
||||
return collected, true, err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nativeCollectedDataset{}, false, nil
|
||||
@@ -583,7 +585,7 @@ func loadWikiContext(dataDir, sourceDir string) (*wikiContext, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
skillDataset, skillOK, err := loadBase("skills")
|
||||
skillDataset, skillOK, err := loadBase("skills", "skills/core")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user