ruvnet/ruflo · error · PodTemplateValidationError
bench.successCriteria must have ≥1 entry
Error message
bench.successCriteria must have ≥1 entry
What it means
Thrown by validatePodBench() when bench.successCriteria is a valid array but has zero entries. A bench must have at least one acceptance criterion — an empty criteria list would make Darwin /loop scoring vacuous, so the schema enforces ≥1.
Source
Thrown at v3/@claude-flow/cli/src/business-pods/pod-schema.ts:147
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) => {
if (typeof s !== 'string' || s.length === 0) {
throw new PodTemplateValidationError('includedEventTypes entries must be non-empty strings', sp);
}
return s;
});View on GitHub (pinned to fa13ee4ad6)
Solutions
- Add at least one concrete, measurable criterion string to bench.successCriteria
- If the pod genuinely has no success definition yet, finish defining it before registering the template — the schema intentionally blocks criterion-less pods
- Use the /bench/successCriteria path from the error to locate the list
- Lint in CI so placeholder templates can't ship
Example fix
// before
"bench": { "name": "b", "description": "d", "successCriteria": [], "scheduleHours": 24 }
// after
"bench": { "name": "b", "description": "d", "successCriteria": ["≥1 closed deal per month"], "scheduleHours": 24 } Defensive patterns
Strategy: validation
Validate before calling
const criteria = (template.bench as { successCriteria?: string[] }).successCriteria ?? [];
if (criteria.length === 0) fail('bench.successCriteria needs at least one measurable criterion'); Type guard
function hasAtLeastOneCriterion(bench: unknown): boolean {
return typeof bench === 'object' && bench !== null &&
Array.isArray((bench as { successCriteria?: unknown[] }).successCriteria) &&
((bench as { successCriteria: unknown[] }).successCriteria.length > 0);
} Try / catch
try {
validatePodTemplate(template);
} catch (e) {
if (e instanceof PodTemplateValidationError && e.message.includes('must have ≥1 entry')) {
fail('A bench without acceptance criteria makes /loop scoring meaningless — add one');
} else throw e;
} Prevention
- Forbid empty successCriteria in template generators — require at least one criterion at authoring time
- Treat placeholder scaffolds ([]) as CI failures, not warnings
- Pair each new pod with one concrete, measurable criterion from day one
When it happens
Trigger: validatePodTemplate() with "successCriteria": [] (all other bench fields fine). The earlier requireArray check passes because [] is an array; only the length check catches it.
Common situations: Templates scaffolded with empty placeholder lists to 'fill in later'; programmatic generation that filters out all criteria for some pods; users assuming criteria are optional decoration.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- bench must be an object
- successCriteria entries must be non-empty strings
- field "${key}" must be a non-empty string
- field "${key}" must be a finite number
- field "${key}" must be a boolean
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/597ae633051ccb45.
Report an issue: GitHub.