{"record":{"id":"8de7537b749fefa5","repo":"JuliusBrussee/caveman","slug":"native-pack-s-conflicts-with-unknown-skill-s","errorCode":null,"errorMessage":"native pack: %s conflicts with unknown skill %s","messagePattern":"native pack: (.+?) conflicts with unknown skill (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/internal/nativepack/pack.go","lineNumber":112,"sourceCode":"\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 {\n\t\t\t\t\treturn fmt.Errorf(\"native pack: unresolved conflict for task type %q between %s and %s\", taskType, a.ID, b.ID)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc contains(values []string, target string) bool {\n\tfor _, value := range values {","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/proxy/internal/nativepack/pack.go#L94-L130","documentation":"Consistency guard in native-pack validation: a skill claims task types that map to an owner/activation rule referencing a skill id not present in the pack. The pack's skills' task-type ownership tables disagree with its skill set.","triggerScenarios":"Thrown at proxy/internal/nativepack/pack.go:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the referenced skill to the pack or fix the task_types list to name existing skill IDs","Repack and revalidate the native pack"],"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-14T00:17:10.932Z"}