{"record":{"id":"8e4c32143f512a98","repo":"Fission-AI/OpenSpec","slug":"invalid-rules-field-in-config-must-be-object","errorCode":null,"errorMessage":"Invalid 'rules' field in config (must be object)","messagePattern":"Invalid 'rules' field in config \\(must be object\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/project-config.ts","lineNumber":352,"sourceCode":"              hasValidRules = true;\n            }\n            if (validRules.length < rulesArrayResult.data.length) {\n              console.warn(\n                `Some rules for '${artifactId}' are empty strings, ignoring them`\n              );\n            }\n          } else {\n            console.warn(\n              `Rules for '${artifactId}' must be an array of strings, ignoring this artifact's rules`\n            );\n          }\n        }\n\n        if (hasValidRules) {\n          config.rules = parsedRules;\n        }\n      } else {\n        console.warn(`Invalid 'rules' field in config (must be object)`);\n      }\n    }\n\n    const operations = parseOperations(raw.operations);\n    if (operations) {\n      config.operations = operations;\n    }\n\n    const references = parseDeclarationList(raw.references);\n    if (references) {\n      config.references = references;\n    }\n\n    // Parse store pointer field: a string, or dropped with a warning.\n    // (Root resolution does NOT use this parse — it uses readStorePointer\n    // below, which errors on malformed pointers instead of dropping.)\n    if (raw.store !== undefined) {\n      if (typeof raw.store === 'string') {","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/project-config.ts#L334-L370","documentation":"Warning from readProjectConfig: the top-level 'rules' field is not an object, so no rules can be parsed from config.yaml. The rest of the config (schema, context, etc.) still applies; the whole rules section is ignored and the field name is reported for correction.","triggerScenarios":"Thrown at src/core/project-config.ts:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Structure 'rules' as a mapping of artifact id to string list","Check for list or scalar syntax at the top of the rules block"],"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"}