# Variable TaskContractSchema`Const`

TaskContractSchema: ZodObject<
{
id: ZodString;
description: ZodString;
status: ZodEnum<
{
failed: "failed";
planning: "planning";
executing: "executing";
approved: "approved";
done: "done";
intake: "intake";
clarifying: "clarifying";
validating: "validating";
},
>;
analysis: ZodObject<
{
complexity: ZodString;
taskType: ZodString;
ambiguityScore: ZodNumber;
},
$strip,
>;
constraints: ZodObject<
{
time: ZodOptional<ZodString>;
quality: ZodOptional<ZodString>;
scope: ZodArray<ZodString>;
},
$strip,
>;
requiredCapabilities: ZodObject<
{ tools: ZodArray<ZodString>; experts: ZodArray<ZodString> },
$strip,
>;
capabilityGaps: ZodObject<
{
available: ZodObject<
{ tools: ZodArray<ZodString>; experts: ZodArray<ZodString> },
$strip,
>;
gaps: ZodArray<ZodUnknown>;
allSatisfied: ZodBoolean;
},
$strip,
>;
parentId: ZodOptional<ZodString>;
artifacts: ZodArray<
ZodObject<
{
id: ZodString;
type: ZodEnum<
{
code: "code";
plan: "plan";
analysis: "analysis";
review: "review";
test: "test";
spec: "spec";
report: "report";
vote: "vote";
},
>;
},
$strip,
>,
>;
metadata: ZodRecord<ZodString, ZodUnknown>;
createdAt: ZodNumber;
updatedAt: ZodNumber;
completedAt: ZodOptional<ZodNumber>;
error: ZodOptional<ZodString>;
},
$strip,
> = ...

Unified task lifecycle contract.

- Defined in packages/nexus-agents/src/pipeline/task-contract.ts:105