ari-zod-schemas
Zod schema management for ARI's type-safe runtime validation
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Zod schema management for ARI's type-safe runtime validation
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Discord slash commands, approval routing, channel policy, button interaction patterns for OpenClaw/ARI Discord integration
Obsidian vault integration patterns — vault-analyzer.ts, /ari-vault-* commands, morning briefing snippet, PARA structure, read-only enforcement
OpenClaw plugin development patterns — hooks, manifest structure, plugin SDK, APEX/CODEX enforcement
NOVA's P1 PayThePryce pipeline — market signal ingest, card detection, price monitoring, script generation, thumbnail generation, video assembly, approval gate
CHASE's P2 Pryceless Solutions pipeline — lead discovery, 5-criteria audit, LLM qualification, Prompt Forge 4-pass lock, demo generation, outreach approval gate
NOVA's thumbnail generation pipeline — Ideogram V3 via Fal.ai (primary) + DALL-E 3 fallback, 4-variant strategy, Pokemon TCG copyright rules,
| name | ari-zod-schemas |
| description | Zod schema management for ARI's type-safe runtime validation |
| triggers | ["create schema","validate types","zod schema","add config validation"] |
ARI uses Zod for all config and data structure validation (ADR-006). This skill ensures:
All Zod schemas live in: src/kernel/types.ts
// Trust levels with risk multipliers
const TrustLevelSchema = z.enum([
'SYSTEM', // 0.5x
'OPERATOR', // 0.6x
'VERIFIED', // 0.75x
'STANDARD', // 1.0x
'UNTRUSTED', // 1.5x
'HOSTILE' // 2.0x
]);
// Audit event for hash chain
const AuditEventSchema = z.object({
id: z.string().uuid(),
timestamp: z.string().datetime(),
action: z.string(),
agent: z.string().optional(),
details: z.record(z.unknown()),
previousHash: z.string(),
hash: z.string()
});
// Message schema
const MessageSchema = z.object({
id: z.string().uuid(),
content: z.string(),
trustLevel: TrustLevelSchema,
timestamp: z.string().datetime(),
metadata: z.record(z.unknown()).optional()
});
// 1. Define schema
export const NewFeatureSchema = z.object({
name: z.string().min(1),
enabled: z.boolean().default(true),
config: z.record(z.string())
});
// 2. Export type
export type NewFeature = z.infer<typeof NewFeatureSchema>;
// 3. Validate at boundary
const validated = NewFeatureSchema.parse(untrustedInput);
const EnvSchema = z.object({
ARI_PORT: z.coerce.number().default(3141),
ARI_LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
// Add new vars here FIRST
});
const EventPayloadSchema = z.discriminatedUnion('type', [
z.object({ type: z.literal('message'), data: MessageSchema }),
z.object({ type: z.literal('audit'), data: AuditEventSchema }),
]);
const ConfigSchema = z.object({
gateway: z.object({
host: z.literal('127.0.0.1'), // Enforces loopback-only
port: z.number().min(1024).max(65535)
}),
security: z.object({
maxRiskScore: z.number().min(0).max(1).default(0.8)
})
});
.strict() to reject unknown keys