{"record":{"id":"2a7f4306cdb38649","repo":"Fission-AI/OpenSpec","slug":"no-root-with-registered-stores","errorCode":"no_root_with_registered_stores","errorMessage":"No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root.","messagePattern":"No OpenSpec root found in the current directory or its ancestors\\. Registered stores: (.+?)\\. Pass --store <id> to use one, or run openspec init to create a local root\\.","errorType":"exception","errorClass":"RootSelectionError","httpStatus":null,"severity":"error","filePath":"src/core/root-selection.ts","lineNumber":437,"sourceCode":"  const defaultStore = getGlobalConfig().defaultStore;\n  if (defaultStore) {\n    return resolveDefaultStoreRoot(defaultStore, options.globalDataDir);\n  }\n\n  let registry;\n  try {\n    registry = await readStoreRegistryState(\n      options.globalDataDir ? { globalDataDir: options.globalDataDir } : {}\n    );\n  } catch (error) {\n    fromStoreError(error);\n  }\n  const registeredIds = registry\n    ? listStoreRegistryEntries(registry).map((entry) => entry.id)\n    : [];\n\n  if (registeredIds.length > 0) {\n    throw new RootSelectionError(\n      `No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root.`,\n      'no_root_with_registered_stores',\n      {\n        target: 'openspec.root',\n        fix: `Rerun with --store <id> (registered: ${registeredIds.join(', ')}) or run openspec init.`,\n      }\n    );\n  }\n\n  if (options.allowImplicitRoot === false) {\n    throw new RootSelectionError(\n      'No OpenSpec root found from the current directory.',\n      'no_openspec_root',\n      { target: 'openspec.root', fix: 'Run openspec init to create a root here.' }\n    );\n  }\n\n  return makeRoot(canonicalDirectory(startPath), 'implicit');","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/root-selection.ts#L419-L455","documentation":"Error \"No OpenSpec root found in the current directory or its ancestors. Registered stores: ${registeredIds.join(', ')}. Pass --store <id> to use one, or run openspec init to create a local root.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/root-selection.ts:437 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"}