# Variable PlanContractSchema`Const`

PlanContractSchema: ZodObject<
{
taskId: ZodString;
stages: ZodArray<
ZodObject<
{
id: ZodString;
type: ZodEnum<
{
analyze: "analyze";
validate: "validate";
aggregate: "aggregate";
execute: "execute";
gate: "gate";
route: "route";
},
>;
pluginId: ZodString;
inputArtifacts: ZodArray<ZodString>;
outputArtifacts: ZodArray<ZodString>;
dependencies: ZodArray<ZodString>;
config: ZodRecord<ZodString, ZodUnknown>;
preferredCli: ZodOptional<ZodString>;
maxRetries: ZodOptional<ZodNumber>;
timeoutMs: ZodOptional<ZodNumber>;
},
$strip,
>,
>;
policyGates: ZodArray<
ZodObject<
{
id: ZodString;
afterStage: ZodString;
beforeStage: ZodString;
rules: ZodArray<ZodString>;
onFail: ZodEnum<{ warn: "warn"; block: "block"; escalate: "escalate" }>;
},
$strip,
>,
>;
estimatedCost: ZodObject<
{
totalTokensIn: ZodNumber;
totalTokensOut: ZodNumber;
estimatedCostUsd: ZodNumber;
modelCalls: ZodNumber;
},
$strip,
>;
approvalRequired: ZodBoolean;
maxIterations: ZodNumber;
timeoutMs: ZodNumber;
},
$strip,
> = ...

Execution plan contract.

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