{"record":{"id":"6cafa9370317f912","repo":"Fission-AI/OpenSpec","slug":"change-changename-not-found-no-changes-exist","errorCode":null,"errorMessage":"Change '${changeName}' not found. No changes exist. Create one with: ${newChangeHint}","messagePattern":"Change '(.+?)' not found\\. No changes exist\\. Create one with: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/workflow/shared.ts","lineNumber":217,"sourceCode":"    throw new Error(\n      `Missing required option --change. Available changes:\\n  ${available.join('\\n  ')}`\n    );\n  }\n\n  // Validate change name format to prevent path traversal\n  const lookupError = validateChangeLookupName(changeName);\n  if (lookupError) {\n    throw new Error(`Invalid change name '${changeName}': ${lookupError}`);\n  }\n\n  // Check directory existence directly\n  const changePath = path.join(changesDir, changeName);\n  const exists = fs.existsSync(changePath) && fs.statSync(changePath).isDirectory();\n\n  if (!exists) {\n    const available = await getAvailableChanges(projectRoot, changesDir);\n    if (available.length === 0) {\n      throw new Error(\n        `Change '${changeName}' not found. No changes exist. Create one with: ${newChangeHint}`\n      );\n    }\n    throw new Error(\n      `Change '${changeName}' not found. Available changes:\\n  ${available.join('\\n  ')}`\n    );\n  }\n\n  return changeName;\n}\n\n/**\n * Validates that a schema exists and returns available schemas if not.\n *\n * @param schemaName - The schema name to validate\n * @param projectRoot - Optional project root for project-local schema resolution\n */\nexport function validateSchemaExists(schemaName: string, projectRoot?: string): string {","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/commands/workflow/shared.ts#L199-L235","documentation":"Not-found branch of validateChangeExists: the named change directory does not exist and there are no changes at all under openspec/changes. The message includes the creation command (newChangeHint) since there is nothing to list.","triggerScenarios":"Thrown at src/commands/workflow/shared.ts:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create a change with openspec new change <name>","Check the store/project root you are operating in"],"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"}