{"record":{"id":"77f771516d5235f2","repo":"Fission-AI/OpenSpec","slug":"no-openspec-planning-home-found-from-the-current-d","errorCode":null,"errorMessage":"No OpenSpec planning home found from the current directory.","messagePattern":"No OpenSpec planning home found from the current directory\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/planning-home.ts","lineNumber":86,"sourceCode":"    root: repoRoot,\n    changesDir: path.join(repoRoot, 'openspec', 'changes'),\n    defaultSchema: REPO_DEFAULT_SCHEMA,\n  };\n}\n\nexport function resolveCurrentPlanningHomeSync(\n  options: ResolvePlanningHomeOptions = {}\n): PlanningHome {\n  const startPath = options.startPath ?? process.cwd();\n  const searchStart = getSearchStartDirectory(startPath);\n  const repoRoot = findRepoPlanningRootSync(searchStart);\n\n  if (repoRoot) {\n    return repoPlanningHome(repoRoot);\n  }\n\n  if (options.allowImplicitRepoRoot === false) {\n    throw new Error('No OpenSpec planning home found from the current directory.');\n  }\n\n  return repoPlanningHome(FileSystemUtils.canonicalizeExistingPath(searchStart));\n}\n\nexport function getChangeDir(planningHome: PlanningHome, changeName: string): string {\n  return FileSystemUtils.joinPath(planningHome.changesDir, changeName);\n}\n\nexport function formatChangeLocation(planningHome: PlanningHome, changeName: string): string {\n  // Repo homes always nest changesDir under the root.\n  return path.relative(planningHome.root, getChangeDir(planningHome, changeName));\n}\n","sourceCodeStart":68,"sourceCodeEnd":100,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/planning-home.ts#L68-L100","documentation":"Thrown by resolveCurrentPlanningHomeSync when no OpenSpec planning root can be found by walking up from the search start directory, and implicit repo-root fallback is explicitly disabled via allowImplicitRepoRoot === false. It is a sentinel guard: the directory tree simply contains no planning home.","triggerScenarios":"Thrown at src/core/planning-home.ts:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run from a directory inside an OpenSpec-initialized repository, or run 'openspec init' to create one","Pass an explicit startPath pointing at a known OpenSpec root","Allow implicit repo-root resolution by not setting allowImplicitRepoRoot to false"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}