{"record":{"id":"27d093678d655287","repo":"JuliusBrussee/caveman","slug":"unknown-import-option-flag","errorCode":null,"errorMessage":"unknown import option ${flag}","messagePattern":"unknown import option (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":1436,"sourceCode":"\t\tentry_condition: entry ? { status: \"inferred_needs_review\", value: entry.slice(0, 240) } : { status: \"missing\" },\n\t\tstop_condition: stop ? { status: \"inferred_needs_review\", value: stop.slice(0, 240) } : { status: \"missing\" },\n\t\tprompt: { bytes, byte_budget: byteBudget, status: bytes <= 8192 ? \"bounded_draft\" : \"needs_deferred_split\" },\n\t\tresources,\n\t\ttransformations: { exact_duplicate_blocks_removed: transformations.removedDuplicates, decorative_separators_removed: transformations.removedSeparators },\n\t\tconflicts: { status: \"needs_review\", declared: [] },\n\t\tbenchmarks: { status: \"required\", fixtures: [] },\n\t\tevidence_status: \"unevaluated\",\n\t\tpublication: { status: \"blocked\", blockers },\n\t};\n}\n\nfunction importSkill(rest: string[]) {\n\tconst allowed = new Set([\"--out\", \"--dry-run\", \"--json\"]);\n\tfor (let index = 1; index < rest.length; index++) {\n\t\tconst value = rest[index]!;\n\t\tif (!value.startsWith(\"--\")) continue;\n\t\tconst flag = value.split(\"=\", 1)[0]!;\n\t\tif (!allowed.has(flag)) throw new Error(`unknown import option ${flag}`);\n\t\tif (flag === \"--out\" && !value.includes(\"=\")) index++;\n\t}\n\tconst input = positionalAfterOptions(rest.slice(1), new Set([\"--out\"]));\n\tif (!input) return skillsUsage();\n\tlet source: { root: string; file: string };\n\ttry { source = importedSkillSource(input); } catch (error) {\n\t\tconsole.error(`caveman skills import: ${(error as Error).message}`);\n\t\tprocess.exit(2);\n\t}\n\tconst sourceBytes = readFileSync(source.file);\n\tlet transformed: ReturnType<typeof cavemannifyImportedSkill>;\n\ttry { transformed = cavemannifyImportedSkill(sourceBytes); } catch (error) {\n\t\tconsole.error(`caveman skills import: ${(error as Error).message}`);\n\t\tprocess.exit(2);\n\t}\n\tconst name = transformed.body.match(/^name:\\s*[\"']?([a-z0-9-]+)[\"']?\\s*$/m)?.[1];\n\tif (!name || name.length > 63) {\n\t\tconsole.error(\"caveman skills import: frontmatter name must be lowercase hyphen-case under 64 characters\");","sourceCodeStart":1418,"sourceCodeEnd":1454,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/cli/src/index.ts#L1418-L1454","documentation":"Error \"unknown import option ${flag}\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/cli/src/index.ts:1436 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unknown import option; check the import command usage."],"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-15T17:31:12.345Z"}