{"record":{"id":"fc60ca08d93e64a8","repo":"Hmbown/CodeWhale","slug":"owned-skill-root-does-not-exist","errorCode":null,"errorMessage":"owned skill root {} does not exist","messagePattern":"owned skill root (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":202,"sourceCode":"        return Ok(());\n    }\n\n    let codewhale_dir = anchor.join(\".codewhale\");\n    let codewhale_exists = checked_real_directory(&codewhale_dir)?;\n    if !codewhale_exists {\n        if require_existing {\n            bail!(\n                \"owned skill parent {} does not exist\",\n                codewhale_dir.display()\n            );\n        }\n        return Ok(());\n    }\n\n    let skills_exists = checked_real_directory(skills_dir)?;\n    if !skills_exists {\n        if require_existing {\n            bail!(\"owned skill root {} does not exist\", skills_dir.display());\n        }\n        return Ok(());\n    }\n\n    let canonical_anchor = fs::canonicalize(anchor)\n        .with_context(|| format!(\"failed to resolve owned anchor {}\", anchor.display()))?;\n    let canonical_skills = fs::canonicalize(skills_dir).with_context(|| {\n        format!(\n            \"failed to resolve owned skill root {}\",\n            skills_dir.display()\n        )\n    })?;\n    if !canonical_skills.starts_with(&canonical_anchor) {\n        bail!(\n            \"owned skill root {} escapes anchor {}\",\n            skills_dir.display(),\n            anchor.display()\n        );","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/skills/mutation.rs#L184-L220","documentation":"validate_owned_target_chain found the anchor and .codewhale directory present but the skills directory itself (<anchor>/.codewhale/skills) missing while require_existing is true. The owned skill root has not been created, so there is no package directory to update, remove, or trust. The missing skills root is the input at fault.","triggerScenarios":"Thrown at crates/tui/src/skills/mutation.rs:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run a skill install/import in the target scope to create the owned skills root","If the skills directory was deleted, reinstall the skill rather than mutating it","Verify the scope (--project vs --global) matches where the skill was installed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}