{"record":{"id":"80e923a19886241e","repo":"Fission-AI/OpenSpec","slug":"store-setup-path-not-directory","errorCode":"store_setup_path_not_directory","errorMessage":"Store setup path is not a directory: ${storeRoot}","messagePattern":"Store setup path is not a directory: (.+?)","errorType":"error_code","errorClass":"StoreError","httpStatus":null,"severity":"error","filePath":"src/core/store/operations.ts","lineNumber":473,"sourceCode":"    ...(origin ? { remote: origin } : {}),\n  });\n}\n\nasync function prepareSetupPlan(\n  input: Pick<SetupStoreInput, 'id' | 'path' | 'allowInsideGitRepository' | 'remote'>\n): Promise<StoreSetupPlan> {\n  const id = validateStoreId(input.id ?? '');\n  if (input.remote !== undefined && input.remote.length === 0) {\n    throw new StoreError('Store remote must not be empty when provided.', 'store_remote_empty', {\n      target: 'store.metadata',\n      fix: 'Pass a clone URL: --remote <url>.',\n    });\n  }\n  const storeRoot = resolveSetupRoot(id, input.path);\n  const kind = await pathKind(storeRoot);\n\n  if (kind === 'file' || kind === 'other') {\n    throw new StoreError(\n      `Store setup path is not a directory: ${storeRoot}`,\n      'store_setup_path_not_directory',\n      {\n        target: 'store.root',\n        fix: 'Choose an empty directory or an existing healthy OpenSpec root.',\n      }\n    );\n  }\n\n  // Stores may be Git-backed, but creating one inside an implementation\n  // repo is almost always an accidental nested-repo setup.\n  await assertSetupPathIsNotNestedInGitRepo(storeRoot, {\n    allowInsideGitRepository: input.allowInsideGitRepository,\n  });\n\n  let metadata: Awaited<ReturnType<typeof readStoreMetadataForOperation>> = null;\n  let backend: StoreGitBackendConfig | undefined;\n","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/store/operations.ts#L455-L491","documentation":"Error \"Store setup path is not a directory: ${storeRoot}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/store/operations.ts:473 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}