{"record":{"id":"5c82e653f804566c","repo":"JuliusBrussee/caveman","slug":"label-lineno-row-must-start-with-an-inline","errorCode":null,"errorMessage":"${label}:${lineNo}: row must start with an inline \"provider\" value","messagePattern":"(.+?):(.+?): row must start with an inline \"provider\" value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/generate-agent-catalog.mjs","lineNumber":66,"sourceCode":"  const rows = [];\n  let row = null;\n  let blockKey = null;\n  const lines = text.split(\"\\n\");\n  for (let index = 0; index < lines.length; index++) {\n    const line = lines[index].replace(/\\s+$/, \"\");\n    const lineNo = index + 1;\n    if (line === \"\" || /^ *#/.test(line)) continue;\n    const shape = /^( *)(- )?(.*)$/.exec(line);\n    const indent = shape[1].length;\n    const dash = shape[2] !== undefined;\n    const rest = shape[3];\n    if (indent === 0) {\n      if (!dash) throw new Error(`${label}:${lineNo}: expected a top-level \"- provider: ...\" row`);\n      row = {};\n      rows.push(row);\n      blockKey = null;\n      const entry = splitKeyValue(rest, label, lineNo);\n      if (entry.value === undefined) throw new Error(`${label}:${lineNo}: row must start with an inline \"provider\" value`);\n      row[entry.key] = entry.value;\n      continue;\n    }\n    if (row === null) throw new Error(`${label}:${lineNo}: indented line before any row`);\n    if (indent === 2) {\n      if (dash) throw new Error(`${label}:${lineNo}: unexpected sequence item at row level`);\n      const entry = splitKeyValue(rest, label, lineNo);\n      if (Object.prototype.hasOwnProperty.call(row, entry.key)) {\n        throw new Error(`${label}:${lineNo}: duplicate key \"${entry.key}\"`);\n      }\n      if (entry.value === undefined) {\n        blockKey = entry.key;\n        row[entry.key] = undefined;\n      } else {\n        blockKey = null;\n        row[entry.key] = entry.value;\n      }\n      continue;","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/scripts/generate-agent-catalog.mjs#L48-L84","documentation":"Thrown by the catalog parser when a top-level \"- ...\" row's first key has no inline value — specifically when the row does not start with \"provider: <value>\". Every row must open with an inline provider value because downstream generation keys rows by provider name; a valueless opening key (\"- provider:\" with nothing after the colon) leaves the row unidentifiable.","triggerScenarios":"Writing \"- provider:\" with the value intended on following indented lines, or starting a row with a different key entirely (\"- name: foo\") — splitKeyValue returns value undefined for a key with no \" value\" suffix, and only provider-with-inline-value is accepted as the row opener.","commonSituations":"Authoring the catalog for the first time from an example that put the provider on the next line; trimming what looked like a redundant value; a row starting with a metadata key instead of provider.","solutions":["Put the provider value inline on the dash line: \"- provider: anthropic\".","If the row started with a different key, reorder so provider comes first with its value, then add other keys as indented \"key: value\" lines below."],"exampleFix":"# before\n- provider:\n  anthropic\n\n# after\n- provider: anthropic","handlingStrategy":"validation","validationCode":"function rowsStartWithInlineProvider(text) {\n  return text.split(\"\\n\").every((line) => {\n    if (/^- /.test(line)) return /^- provider: \\S/.test(line.replace(/\\s+$/, \"\"));\n    return true;\n  });\n}","typeGuard":null,"tryCatchPattern":"try {\n  parseCatalog(text);\n} catch (err) {\n  if (/row must start with an inline/.test(err.message)) {\n    // fix the named line to \"- provider: <value>\" and re-run\n  } else throw err;\n}","preventionTips":["Copy an existing provider row as the template for new rows.","Never split the provider name onto its own line."],"tags":["yaml","parser","code-generation","catalog"],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}