{"record":{"id":"dc51412afb2b6efa","repo":"JuliusBrussee/caveman","slug":"native-pack-invalid-skill-q","errorCode":null,"errorMessage":"native pack: invalid skill %q","messagePattern":"native pack: invalid skill %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/internal/nativepack/pack.go","lineNumber":102,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn selected, found\n}\n\nfunc validate(pack Pack) error {\n\tif pack.Schema != \"caveman.native-pack.v1\" || pack.ID == \"\" || pack.Version == \"\" || pack.Protocol < 1 {\n\t\treturn errors.New(\"native pack: invalid identity\")\n\t}\n\tif !pack.Core.Mandatory || pack.Core.Instructions == \"\" || pack.Core.EstimatedTokens > pack.Core.PromptTokenBudget {\n\t\treturn errors.New(\"native pack: invalid Core budget or instructions\")\n\t}\n\towners := map[string][]Skill{}\n\tids := map[string]bool{}\n\tfor _, skill := range pack.Skills {\n\t\tif skill.ID == \"\" || ids[skill.ID] || skill.Activation != \"classified\" || skill.Instructions == \"\" || len(skill.Instructions) > skill.PromptByteBudget {\n\t\t\treturn fmt.Errorf(\"native pack: invalid skill %q\", skill.ID)\n\t\t}\n\t\tids[skill.ID] = true\n\t\tfor _, taskType := range skill.TaskTypes {\n\t\t\towners[taskType] = append(owners[taskType], skill)\n\t\t}\n\t}\n\tfor _, skill := range pack.Skills {\n\t\tfor _, conflict := range skill.Conflicts {\n\t\t\tif !ids[conflict] {\n\t\t\t\treturn fmt.Errorf(\"native pack: %s conflicts with unknown skill %s\", skill.ID, conflict)\n\t\t\t}\n\t\t}\n\t}\n\tfor taskType, candidates := range owners {\n\t\tfor left := 0; left < len(candidates); left++ {\n\t\t\tfor right := left + 1; right < len(candidates); right++ {\n\t\t\t\ta, b := candidates[left], candidates[right]\n\t\t\t\tif !contains(a.Conflicts, b.ID) || !contains(b.Conflicts, a.ID) || a.Precedence == b.Precedence {","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/proxy/internal/nativepack/pack.go#L84-L120","documentation":"A skill inside a native pack failed structural validation: it has an empty or duplicate ID, an activation other than \"classified\", empty instructions, or instructions longer than its prompt byte budget, so the pack cannot be loaded.","triggerScenarios":"Thrown at proxy/internal/nativepack/pack.go:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Give each skill a unique non-empty ID and set activation to \"classified\"","Ensure instructions are non-empty and fit within skill.prompt_byte_budget","Rebuild/repack the native pack so it conforms to caveman.native-pack.v1"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}