{"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":"Error \"Missing required argument <spec-id>\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/commands/spec.ts:115 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"}