{"record":{"id":"6d516302d444315d","repo":"Fission-AI/OpenSpec","slug":"guidance-for-operation-operationid-must-be-an","errorCode":null,"errorMessage":"Guidance for operation '${operationId}' must be an array of strings, ignoring this operation's guidance","messagePattern":"Guidance for operation '(.+?)' must be an array of strings, ignoring this operation's guidance","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/project-config.ts","lineNumber":163,"sourceCode":"      );\n      continue;\n    }\n\n    const operation = value as Record<string, unknown>;\n    const unknownFields = Object.keys(operation).filter((field) => field !== 'guidance');\n    if (unknownFields.length > 0) {\n      console.warn(\n        `Unknown field(s) in 'operations.${operationId}': ${unknownFields.join(', ')}. Supported fields: guidance`\n      );\n    }\n\n    if (operation.guidance === undefined) {\n      continue;\n    }\n\n    const guidanceResult = z.array(z.string()).safeParse(operation.guidance);\n    if (!guidanceResult.success) {\n      console.warn(\n        `Guidance for operation '${operationId}' must be an array of strings, ignoring this operation's guidance`\n      );\n      continue;\n    }\n\n    const guidance = guidanceResult.data.filter((entry) => entry.length > 0);\n    if (guidance.length < guidanceResult.data.length) {\n      console.warn(\n        `Some guidance for operation '${operationId}' are empty strings, ignoring them`\n      );\n    }\n    if (guidance.length > 0) {\n      operations[typedOperationId] = { guidance };\n    }\n  }\n\n  return Object.keys(operations).length > 0 ? operations : undefined;\n}","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/project-config.ts#L145-L181","documentation":"Warning from parseOperations: an operation's 'guidance' failed the array-of-strings Zod parse (e.g. a bare string or nested objects). The whole guidance list for that operation is dropped; other operations are unaffected.","triggerScenarios":"Thrown at src/core/project-config.ts:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write guidance as a YAML list of quoted strings","Remove non-string entries from the guidance array"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}