topdata: stop hardcoding the skills dataset location
build-binaries / build-binaries (pull_request) Successful in 2m9s
test / test (pull_request) Successful in 1m23s

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:
2026-07-19 09:25:39 +02:00
co-authored by Claude Fable 5
parent 24e57457b0
commit adffb1e11d
3 changed files with 35 additions and 13 deletions
+8 -6
View File
@@ -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
}