{"record":{"id":"fb104d93c3caa8ed","repo":"Fission-AI/OpenSpec","slug":"the-store-declaration-in-pointer-filepath-is-in","errorCode":null,"errorMessage":"The store declaration in ${pointer.filePath} is invalid (${storePointerProblem(pointer.malformed)}). Fix or remove the store: line before running openspec init.","messagePattern":"The store declaration in (.+?) is invalid \\((.+?)\\)\\. Fix or remove the store: line before running openspec init\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/init.ts","lineNumber":201,"sourceCode":"    const openspecDir = OPENSPEC_DIR_NAME;\n    const openspecPath = path.join(projectPath, openspecDir);\n\n    // Validation happens silently in the background\n    const extendMode = await this.validate(projectPath, openspecPath);\n\n    // Pointer guard (slice 3.2): a config-only openspec/ with a store:\n    // declaration is externalized planning, not a root to extend — and a\n    // subdirectory of such a repo must not silently grow a nested root.\n    // Refuse before legacy cleanup, migration, or prompts touch anything.\n    // In extend mode the walk finds projectPath itself; otherwise it\n    // finds the nearest ancestor root (so pointer-repo subdirectories\n    // refuse exactly where a normal command would resolve the pointer).\n    const guardRoot = findRepoPlanningRootSync(projectPath);\n    if (guardRoot) {\n      const { hasPlanningShape, pointer } = classifyOpenSpecDir(guardRoot);\n      if (!hasPlanningShape) {\n        if (pointer.malformed) {\n          throw new Error(\n            `The store declaration in ${pointer.filePath} is invalid (` +\n              storePointerProblem(pointer.malformed) +\n              `). Fix or remove the store: line before running openspec init.`\n          );\n        }\n        if (pointer.value !== undefined) {\n          throw new Error(\n            `This repo's planning is externalized to store '${pointer.value}' (${pointer.filePath}). ` +\n              `Remove the store: line first to convert this repo to a local OpenSpec root.`\n          );\n        }\n      }\n    }\n\n    await this.assertLanguageCanBeApplied(projectPath, openspecPath);\n\n    // Check for legacy artifacts and handle cleanup\n    const deferredLegacyCleanup = await this.handleLegacyCleanup(projectPath, extendMode);","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/init.ts#L183-L219","documentation":"Error \"The store declaration in ${pointer.filePath} is invalid (${storePointerProblem(pointer.malformed)}). Fix or remove the store: line before running openspec init.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/init.ts:201 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"}