{"record":{"id":"f64e2c3b47189f21","repo":"JuliusBrussee/caveman","slug":"source-does-not-exist-input","errorCode":null,"errorMessage":"source does not exist: ${input}","messagePattern":"source does not exist: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":1347,"sourceCode":"\tschema: \"caveman.skill-import.v1\";\n\tid: string;\n\tsource_sha256: string;\n\tactivation: { status: string; basis: string };\n\tentry_condition: { status: string; value?: string };\n\tstop_condition: { status: string; value?: string };\n\tprompt: { bytes: number; byte_budget: number; status: string };\n\tresources: { scripts: string[]; references: string[]; assets: string[]; status: string };\n\ttransformations: { exact_duplicate_blocks_removed: number; decorative_separators_removed: number };\n\tconflicts: { status: \"needs_review\"; declared: string[] };\n\tbenchmarks: { status: \"required\"; fixtures: string[] };\n\tevidence_status: \"unevaluated\";\n\tpublication: { status: \"blocked\"; blockers: string[] };\n};\n\nfunction importedSkillSource(input: string): { root: string; file: string } {\n\tlet resolved: string;\n\ttry { resolved = realpathSync(resolve(process.cwd(), expandTilde(input))); } catch {\n\t\tthrow new Error(`source does not exist: ${input}`);\n\t}\n\tconst stat = lstatSync(resolved);\n\tconst file = stat.isDirectory() ? join(resolved, SKILL_MD) : resolved;\n\tif (!stat.isDirectory() && basename(resolved) !== SKILL_MD) throw new Error(\"source file must be named SKILL.md\");\n\tif (!hasFile(file)) throw new Error(`SKILL.md missing under ${resolved}`);\n\treturn { root: stat.isDirectory() ? resolved : dirname(resolved), file };\n}\n\nfunction cavemannifyImportedSkill(bytes: Buffer): { body: string; removedDuplicates: number; removedSeparators: number } {\n\tif (bytes.length === 0 || bytes.length > 256 * 1024) throw new Error(\"SKILL.md must be 1..262144 bytes\");\n\tif (bytes.includes(0)) throw new Error(\"SKILL.md contains NUL bytes\");\n\tconst text = bytes.toString(\"utf8\");\n\tif (!Buffer.from(text, \"utf8\").equals(bytes)) throw new Error(\"SKILL.md must be valid UTF-8\");\n\tif (/-----BEGIN [A-Z ]*PRIVATE KEY-----|\\b(?:sk|ghp|github_pat|xox[baprs])[-_][A-Za-z0-9_-]{16,}/i.test(text)) {\n\t\tthrow new Error(\"SKILL.md contains credential-shaped material\");\n\t}\n\tconst split = splitSkillMarkdown(bytes);\n\tif (!split) throw new Error(\"SKILL.md needs closed YAML frontmatter\");","sourceCodeStart":1329,"sourceCodeEnd":1365,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/cli/src/index.ts#L1329-L1365","documentation":"Error \"source does not exist: ${input}\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/cli/src/index.ts:1347 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point --source at an existing SKILL.md file path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}