{"record":{"id":"14f01e0648588888","repo":"Fission-AI/OpenSpec","slug":"options-requirements-and-requirement-cannot-be","errorCode":null,"errorMessage":"Options --requirements and --requirement cannot be used together","messagePattern":"Options --requirements and --requirement cannot be used together","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/spec.ts","lineNumber":130,"sourceCode":"          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);\n      const output = {\n        id: specId,\n        title: parsed.name,\n        overview: parsed.overview,\n        requirementCount: filtered.requirements.length,\n        requirements: filtered.requirements,\n        metadata: parsed.metadata ?? { version: '1.0.0', format: 'openspec' as const },\n        ...(options.rootOutput ? { root: options.rootOutput } : {}),\n      };\n      console.log(JSON.stringify(output, null, 2));\n      return;\n    }\n    printSpecTextRaw(this.specsDir, specPath);\n  }\n}","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/commands/spec.ts#L112-L148","documentation":"Error \"Options --requirements and --requirement cannot be used together\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/commands/spec.ts:130 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"}