# Variable TaskOutcomeSchema`Const`

TaskOutcomeSchema: ZodObject<
{
routingDecisionId: ZodUUID;
timestamp: ZodISODateTime;
outcomeClass: ZodEnum<
{
error: "error";
timeout: "timeout";
success: "success";
failure: "failure";
partial: "partial";
},
>;
success: ZodBoolean;
qualityScore: ZodNumber;
durationMs: ZodNumber;
tokenUsage: ZodNumber;
errorMessage: ZodOptional<ZodString>;
qualitySignals: ZodObject<
{
testsPass: ZodOptional<ZodBoolean>;
lintErrors: ZodOptional<ZodNumber>;
userApproved: ZodOptional<ZodBoolean>;
retryCount: ZodDefault<ZodNumber>;
completionRatio: ZodDefault<ZodNumber>;
validStructure: ZodOptional<ZodBoolean>;
coherenceScore: ZodOptional<ZodNumber>;
},
$strip,
>;
traceId: ZodString;
},
$strip,
> = ...

Zod schema for task outcome.

- Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:139