{"record":{"id":"50da1358932b2349","repo":"Fission-AI/OpenSpec","slug":"insufficient-permissions-to-write-to-projectpath","errorCode":null,"errorMessage":"Insufficient permissions to write to ${projectPath}","messagePattern":"Insufficient permissions to write to (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/init.ts","lineNumber":357,"sourceCode":"      throw new Error(\n        `OpenSpec setup failed for: ${results.failedTools.map((tool) => tool.name).join(', ')}`\n      );\n    }\n  }\n\n  // ═══════════════════════════════════════════════════════════\n  // VALIDATION & SETUP\n  // ═══════════════════════════════════════════════════════════\n\n  private async validate(\n    projectPath: string,\n    openspecPath: string\n  ): Promise<boolean> {\n    const extendMode = await FileSystemUtils.directoryExists(openspecPath);\n\n    // Check write permissions\n    if (!(await FileSystemUtils.ensureWritePermissions(projectPath))) {\n      throw new Error(`Insufficient permissions to write to ${projectPath}`);\n    }\n    return extendMode;\n  }\n\n  private canPromptInteractively(): boolean {\n    if (this.interactiveOption === false) return false;\n    if (this.toolsArg !== undefined) return false;\n    return isInteractive({ interactive: this.interactiveOption });\n  }\n\n  /**\n   * Decide whether to generate GitHub Copilot cloud files, and whether to\n   * persist that decision. Precedence:\n   *   1. `--copilot-cloud` / `--no-copilot-cloud` flag (explicit this run)\n   *   2. persisted opt-in in config.yaml\n   *   3. managed files already present (migration for pre-opt-in projects)\n   *   4. interactive confirm (default No)\n   *   5. non-interactive with no signal: skip, and don't persist a default","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/init.ts#L339-L375","documentation":"Error \"Insufficient permissions to write to ${projectPath}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/init.ts:357 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"}