{"record":{"id":"1449ddceb39878b6","repo":"Fission-AI/OpenSpec","slug":"specname-validation-failed-duplicate-requirem-1449dd","errorCode":null,"errorMessage":"${specName} validation failed - duplicate requirement in MODIFIED for header \"### Requirement: ${mod.name}\"","messagePattern":"(.+?) validation failed - duplicate requirement in MODIFIED for header \"### Requirement: (.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/specs-apply.ts","lineNumber":212,"sourceCode":"  const plan = parseDeltaSpec(changeContent);\n  const specName = update.id;\n\n  // Pre-validate duplicates within sections\n  const addedNames = new Set<string>();\n  for (const add of plan.added) {\n    const name = normalizeRequirementName(add.name);\n    if (addedNames.has(name)) {\n      throw new Error(\n        `${specName} validation failed - duplicate requirement in ADDED for header \"### Requirement: ${add.name}\"`\n      );\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) {","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/specs-apply.ts#L194-L230","documentation":"Error \"${specName} validation failed - duplicate requirement in MODIFIED for header \"### Requirement: ${mod.name}\"\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/specs-apply.ts:212 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"}