{"record":{"id":"e20b8f9787bf26bb","repo":"Fission-AI/OpenSpec","slug":"missing-required-argument-spec-id","errorCode":null,"errorMessage":"Missing required argument <spec-id>","messagePattern":"Missing required argument <spec-id>","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/spec.ts","lineNumber":115,"sourceCode":"  // rootPath is set only by root-aware callers (top-level `show`); the\n  // deprecated noun-form commands stay cwd-based.\n  constructor(rootPath?: string) {\n    this.rootPath = rootPath;\n    this.specsDir = rootPath ? join(rootPath, 'openspec', 'specs') : SPECS_DIR;\n  }\n\n  async show(specId?: string, options: ShowOptions = {}): Promise<void> {\n    if (!specId) {\n      const canPrompt = isInteractive(options);\n      const specIds = await getSpecIds(this.rootPath ?? process.cwd());\n      if (canPrompt && specIds.length > 0) {\n        const { select } = await import('@inquirer/prompts');\n        specId = await select({\n          message: 'Select a spec to show',\n          choices: specIds.map(id => ({ name: id, value: id })),\n        });\n      } else {\n        throw new Error('Missing required argument <spec-id>');\n      }\n    }\n\n    const specPath = join(this.specsDir, specId, 'spec.md');\n    assertSpecPath(this.specsDir, specPath);\n    if (!existsSync(specPath)) {\n      // Root-aware callers get the absolute path; the cwd-based noun form\n      // keeps its historical forward-slash relative message on all platforms.\n      const displayPath = this.rootPath ? specPath : `openspec/specs/${specId}/spec.md`;\n      throw new Error(`Spec '${specId}' not found at ${displayPath}`);\n    }\n\n    if (options.json) {\n      if (options.requirements && options.requirement) {\n        throw new Error('Options --requirements and --requirement cannot be used together');\n      }\n      const parsed = parseSpecFromFile(this.specsDir, specPath, specId);\n      const filtered = filterSpec(parsed, options);","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/commands/spec.ts#L97-L133","documentation":"Thrown by SpecCommand.show when no spec-id argument was supplied and interactive selection is impossible (non-TTY) or there are no specs to offer. It is the non-interactive equivalent of the selection prompt.","triggerScenarios":"Thrown at src/commands/spec.ts:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a spec-id: openspec spec show <spec-id>","Run in an interactive terminal to get the selection prompt"],"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"}