{"record":{"id":"47078cc4c0a5afbb","repo":"ruvnet/ruflo","slug":"pod-template-at-path-name-must-be-lowercase-ke","errorCode":null,"errorMessage":"pod-template at ${path}: name must be lowercase-kebab (e.g. \"sales\")","messagePattern":"pod-template at (.+?): name must be lowercase-kebab \\(e\\.g\\. \"sales\"\\)","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":193,"sourceCode":"// time. We only catch obviously malformed values here.\nconst CRON_RE = /^([\\d*/,\\-]+\\s+){4,5}[\\d*/,\\-]+$/;\n\n/**\n * Validate `json` and return a typed `PodTemplate`. Throws\n * `PodTemplateValidationError` with a JSON-pointer-style path on failure.\n *\n * Used by:\n *   - `business_pod_validate` MCP tool — returns the error verbatim\n *   - `pod-tick.mjs` — pre-flight check before any pod execution\n *   - any external schema-loader that wants typed templates\n */\nexport function validatePodTemplate(json: unknown): PodTemplate {\n  if (!isObject(json)) {\n    throw new PodTemplateValidationError('pod-template must be a JSON object', '/');\n  }\n  const name = requireString(json, 'name', '/');\n  if (!/^[a-z][a-z0-9-]*$/.test(name)) {\n    throw new PodTemplateValidationError('name must be lowercase-kebab (e.g. \"sales\")', '/');\n  }\n  const displayName = requireString(json, 'displayName', '/');\n  const roomId = requireString(json, 'roomId', '/');\n  if (!/^[A-Za-z0-9_.\\-:/@#]+$/.test(roomId)) {\n    throw new PodTemplateValidationError(\n      'roomId may only contain [A-Za-z0-9_.\\\\-:/@#]',\n      '/',\n    );\n  }\n  const agents = requireArray(json, 'agents', '/', validatePodAgent);\n  if (agents.length === 0) {\n    throw new PodTemplateValidationError('agents must have ≥1 entry', '/');\n  }\n  const allowedMcpTools = requireArray(json, 'allowedMcpTools', '/', (t, tp) => {\n    if (typeof t !== 'string' || t.length === 0) {\n      throw new PodTemplateValidationError(\n        'allowedMcpTools entries must be non-empty strings',\n        tp,","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L175-L211","documentation":"Thrown by validatePodTemplate() when the 'name' field fails the regex /^[a-z][a-z0-9-]*$/. The name must start with a lowercase letter and contain only lowercase letters, digits, and hyphens (lowercase-kebab). This name is canonical and matches the BBS roomId, so strict casing is enforced.","triggerScenarios":"The pod-template JSON has a 'name' value like 'Sales', 'sales_pod', '1sales', '-sales', or 'SALES'. Any uppercase character, underscore, leading digit, or leading hyphen triggers this error.","commonSituations":"A copy-pasted display name was accidentally used for the machine-readable 'name' field; a pod template was authored with CamelCase or snake_case naming conventions from another system.","solutions":["Change the 'name' field to lowercase-kebab (e.g. 'sales', 'lead-gen', 'hr-onboarding')","Ensure the name starts with a lowercase letter a-z, not a digit or hyphen","Replace any underscores with hyphens"],"exampleFix":"// before\n{ \"name\": \"Sales_Pipeline\", ... }\n\n// after\n{ \"name\": \"sales-pipeline\", ... }","handlingStrategy":"validation","validationCode":"const NAME_RE = /^[a-z][a-z0-9-]*$/;\nfunction isValidPodName(name: string): boolean {\n  return NAME_RE.test(name);\n}\n\nif (!isValidPodName(template.name)) {\n  throw new Error('name must be lowercase-kebab');\n}","typeGuard":"function isLowercaseKebab(s: string): boolean {\n  return /^[a-z][a-z0-9-]*$/.test(s);\n}","tryCatchPattern":"try {\n  validatePodTemplate(json);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError && e.message.includes('name must be lowercase-kebab')) {\n    // Fix the name field and retry\n  }\n}","preventionTips":["Use only lowercase letters, digits, and hyphens for the 'name' field","Start the name with a lowercase letter, never a digit or hyphen","Reserve uppercase and spaces for 'displayName'"],"tags":["pod-template","validation","naming","schema"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}