{"record":{"id":"6dcd812dffad86cf","repo":"Fission-AI/OpenSpec","slug":"change-must-have-a-why-section-6dcd81","errorCode":null,"errorMessage":"Change must have a Why section","messagePattern":"Change must have a Why section","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/parsers/markdown-parser.ts","lineNumber":61,"sourceCode":"\n    return {\n      name,\n      overview: purpose.trim(),\n      requirements,\n      metadata: {\n        version: '1.0.0',\n        format: 'openspec',\n      },\n    };\n  }\n\n  parseChange(name: string): Change {\n    const sections = this.parseSections();\n    const why = this.findSection(sections, 'Why')?.content || '';\n    const whatChanges = this.findSection(sections, 'What Changes')?.content || '';\n    \n    if (!why) {\n      throw new Error('Change must have a Why section');\n    }\n    \n    if (!whatChanges) {\n      throw new Error('Change must have a What Changes section');\n    }\n\n    const deltas = this.parseDeltas(whatChanges);\n\n    return {\n      name,\n      why: why.trim(),\n      whatChanges: whatChanges.trim(),\n      deltas,\n      metadata: {\n        version: '1.0.0',\n        format: 'openspec-change',\n      },\n    };","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/parsers/markdown-parser.ts#L43-L79","documentation":"Error \"Change must have a Why section\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/parsers/markdown-parser.ts:61 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"}