# Variable RulesSnapshotSchema`Const`

RulesSnapshotSchema: ZodObject<
{
version: ZodLiteral<1>;
savedAt: ZodString;
rules: ZodArray<
ZodObject<
{
id: ZodString;
patternType: ZodEnum<
{
"failure-rate": "failure-rate";
"success-rate": "success-rate";
"latency-spike": "latency-spike";
},
>;
cli: ZodEnum<
{
claude: "claude";
gemini: "gemini";
codex: "codex";
opencode: "opencode";
},
>;
category: ZodString;
action: ZodEnum<
{ penalize: "penalize"; boost: "boost"; avoid: "avoid" },
>;
confidence: ZodNumber;
observationCount: ZodNumber;
metric: ZodNumber;
status: ZodEnum<
{
draft: "draft";
active: "active";
promoted: "promoted";
expired: "expired";
},
>;
createdAt: ZodNumber;
updatedAt: ZodNumber;
tainted: ZodBoolean;
},
$strip,
>,
>;
},
$strip,
> = ...

Versioned snapshot schema for atomic saves.

- Defined in packages/nexus-agents/src/learning/strategy-distiller-persistence.ts:44