File size: 751 Bytes
60e766b
 
 
 
 
 
 
 
 
 
 
 
 
 
3590954
60e766b
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { z } from "zod";

export const taskSchema = z.object({
  title: z.string().min(1).max(200),
  description: z.string().max(2000).optional().default(""),
  acceptance_criteria: z.array(z.string().min(1).max(300)).max(8).optional().default([]),
  effort: z.enum(["S", "M", "L"]).optional(),
});

export const generatedSpecSchema = z.object({
  title: z.string().min(1).max(200),
  problem_statement: z.string().min(1).max(2000),
  tags: z.array(z.string().min(1).max(40)).max(10).default([]),
  features: z.array(z.string().min(1).max(300)).min(3).max(7),
  tasks: z.array(taskSchema).min(6).max(12),
  open_questions: z.array(z.string().min(1).max(300)).max(10).default([]),
});

export type GeneratedSpec = z.infer<typeof generatedSpecSchema>;