ruvnet/ruflo · error · PodTemplateValidationError

pod-template at ${path}: successCriteria entries must be non

Error message

pod-template at ${path}: successCriteria entries must be non-empty strings

What it means

Thrown inside validatePodBench() while validating each element of the successCriteria array. Fires when an entry is not a string or is an empty string. successCriteria is the list of human-readable acceptance bullets the bench evaluates against, so each must be a meaningful non-empty string.

Source

Thrown at v3/@claude-flow/cli/src/business-pods/pod-schema.ts:142

}

function validatePodAgent(item: unknown, path: string): PodAgent {
  if (!isObject(item)) throw new PodTemplateValidationError('agent must be an object', path);
  return {
    role: requireString(item, 'role', path),
    agentType: requireString(item, 'agentType', path),
    description: requireString(item, 'description', path),
    preferLocal: requireBoolean(item, 'preferLocal', path),
  };
}

function validatePodBench(item: unknown, path: string): PodBench {
  if (!isObject(item)) throw new PodTemplateValidationError('bench must be an object', path);
  const name = requireString(item, 'name', path);
  const description = requireString(item, 'description', path);
  const successCriteria = requireArray(item, 'successCriteria', path, (s, sp) => {
    if (typeof s !== 'string' || s.length === 0) {
      throw new PodTemplateValidationError('successCriteria entries must be non-empty strings', sp);
    }
    return s;
  });
  if (successCriteria.length === 0) {
    throw new PodTemplateValidationError('bench.successCriteria must have ≥1 entry', path);
  }
  const scheduleHours = requireNumber(item, 'scheduleHours', path);
  if (scheduleHours < 1) {
    throw new PodTemplateValidationError('bench.scheduleHours must be ≥1', path);
  }
  return { name, description, successCriteria, scheduleHours };
}

function validateAuditReadView(item: unknown, path: string): PodAuditReadView {
  if (!isObject(item)) {
    throw new PodTemplateValidationError('auditReadView must be an object', path);
  }
  const includedEventTypes = requireArray(item, 'includedEventTypes', path, (s, sp) => {

View on GitHub (pinned to 6b01dc5a68)

Solutions

  1. Read the error path — it includes the index (e.g., /bench/successCriteria[1]) of the bad entry
  2. Ensure every successCriteria entry is a non-empty descriptive string

Example fix

// before:
"successCriteria": ["Pipeline value increased", ""] // empty string, throws

// after:
"successCriteria": ["Pipeline value increased", "Conversion rate above 20%"]
Defensive patterns

Strategy: validation

Validate before calling

import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';

try {
  const pod = validatePodTemplate(parsedJson);
} catch (e) {
  if (e instanceof PodTemplateValidationError) {
    // e.path includes the index, e.g. /bench/successCriteria[1]
    console.error(`successCriteria entry error at ${e.path}: ${e.message}`);
  }
}

Try / catch

import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';

try {
  const pod = validatePodTemplate(raw);
} catch (e) {
  if (e instanceof PodTemplateValidationError) {
    console.error(e.message);
    process.exit(1);
  }
  throw e;
}

Prevention

When it happens

Trigger: validatePodBench() runs requireArray() on bench.successCriteria, then maps each entry through an item validator; an entry is not a string or is empty.

Common situations: A successCriteria entry is null, a number, an empty string from a template placeholder left unfilled, or a trailing comma producing an empty element.

Related errors


AI-assisted analysis of ruvnet/ruflo@6b01dc5a68 (2026-08-12). Data as JSON: /api/errors/be279012e815acb2. Report an issue: GitHub.