{"record":{"id":"75f0b540dac0cae1","repo":"ruvnet/ruflo","slug":"pod-template-at-path-bench-successcriteria-mus","errorCode":null,"errorMessage":"pod-template at ${path}: bench.successCriteria must have ≥1 entry","messagePattern":"pod-template at (.+?): bench\\.successCriteria must have ≥1 entry","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":147,"sourceCode":"    role: requireString(item, 'role', path),\n    agentType: requireString(item, 'agentType', path),\n    description: requireString(item, 'description', path),\n    preferLocal: requireBoolean(item, 'preferLocal', path),\n  };\n}\n\nfunction validatePodBench(item: unknown, path: string): PodBench {\n  if (!isObject(item)) throw new PodTemplateValidationError('bench must be an object', path);\n  const name = requireString(item, 'name', path);\n  const description = requireString(item, 'description', path);\n  const successCriteria = requireArray(item, 'successCriteria', path, (s, sp) => {\n    if (typeof s !== 'string' || s.length === 0) {\n      throw new PodTemplateValidationError('successCriteria entries must be non-empty strings', sp);\n    }\n    return s;\n  });\n  if (successCriteria.length === 0) {\n    throw new PodTemplateValidationError('bench.successCriteria must have ≥1 entry', path);\n  }\n  const scheduleHours = requireNumber(item, 'scheduleHours', path);\n  if (scheduleHours < 1) {\n    throw new PodTemplateValidationError('bench.scheduleHours must be ≥1', path);\n  }\n  return { name, description, successCriteria, scheduleHours };\n}\n\nfunction validateAuditReadView(item: unknown, path: string): PodAuditReadView {\n  if (!isObject(item)) {\n    throw new PodTemplateValidationError('auditReadView must be an object', path);\n  }\n  const includedEventTypes = requireArray(item, 'includedEventTypes', path, (s, sp) => {\n    if (typeof s !== 'string' || s.length === 0) {\n      throw new PodTemplateValidationError('includedEventTypes entries must be non-empty strings', sp);\n    }\n    return s;\n  });","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L129-L165","documentation":"Thrown inside validatePodBench() after all successCriteria entries pass the non-empty-string check. Fires when the array exists and all entries are valid strings, but the array has zero elements. A bench must define at least one acceptance criterion to be meaningful.","triggerScenarios":"validatePodBench() validates successCriteria as an array of non-empty strings (passes), then checks successCriteria.length === 0 and throws.","commonSituations":"A template created with an empty successCriteria placeholder (\"successCriteria\": []); a programmatic generator that produced no criteria.","solutions":["Add at least one non-empty acceptance criterion string to bench.successCriteria","Model the criteria on a reference template's bench block"],"exampleFix":"// before:\n\"successCriteria\": [] // empty array, throws\n\n// after:\n\"successCriteria\": [\"Pipeline value increased week-over-week\"]","handlingStrategy":"validation","validationCode":"import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';\n\ntry {\n  const pod = validatePodTemplate(parsedJson);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError) {\n    console.error(`successCriteria length error at ${e.path}: ${e.message}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';\n\ntry {\n  const pod = validatePodTemplate(raw);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError) {\n    console.error(e.message);\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Provide at least one meaningful acceptance criterion in bench.successCriteria","Do not deploy templates with empty arrays as placeholders","Validate templates with validatePodTemplate() in CI"],"tags":["validation","pod-template","schema","bench","arrays"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}