{"record":{"id":"61f6587b4763089d","repo":"Fission-AI/OpenSpec","slug":"specname-validation-failed-duplicate-requirem-61f658","errorCode":null,"errorMessage":"${specName} validation failed - duplicate requirement in REMOVED for header \"### Requirement: ${rem}\"","messagePattern":"(.+?) validation failed - duplicate requirement in REMOVED for header \"### Requirement: (.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/specs-apply.ts","lineNumber":222,"sourceCode":"      );\n    }\n    addedNames.add(name);\n  }\n  const modifiedNames = new Set<string>();\n  for (const mod of plan.modified) {\n    const name = normalizeRequirementName(mod.name);\n    if (modifiedNames.has(name)) {\n      throw new Error(\n        `${specName} validation failed - duplicate requirement in MODIFIED for header \"### Requirement: ${mod.name}\"`\n      );\n    }\n    modifiedNames.add(name);\n  }\n  const removedNamesSet = new Set<string>();\n  for (const rem of plan.removed) {\n    const name = normalizeRequirementName(rem);\n    if (removedNamesSet.has(name)) {\n      throw new Error(\n        `${specName} validation failed - duplicate requirement in REMOVED for header \"### Requirement: ${rem}\"`\n      );\n    }\n    removedNamesSet.add(name);\n  }\n  const renamedFromSet = new Set<string>();\n  const renamedToSet = new Set<string>();\n  for (const { from, to } of plan.renamed) {\n    const fromNorm = normalizeRequirementName(from);\n    const toNorm = normalizeRequirementName(to);\n    if (renamedFromSet.has(fromNorm)) {\n      throw new Error(\n        `${specName} validation failed - duplicate FROM in RENAMED for header \"### Requirement: ${from}\"`\n      );\n    }\n    if (renamedToSet.has(toNorm)) {\n      throw new Error(\n        `${specName} validation failed - duplicate TO in RENAMED for header \"### Requirement: ${to}\"`","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/specs-apply.ts#L204-L240","documentation":"Error \"${specName} validation failed - duplicate requirement in REMOVED for header \"### Requirement: ${rem}\"\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/specs-apply.ts:222 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"}