Spaces:
Running
Running
Download lib/spec-schema.ts from Jacksuyu/demandsolution-codex: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/Jacksuyu/demandsolution-codex/resolve/main/lib/spec-schema.ts
- Command line
-
hf download hf://spaces/Jacksuyu/demandsolution-codex/lib/spec-schema.ts
-
curl -L -o spec-schema.ts https://huggingface.co/spaces/Jacksuyu/demandsolution-codex/resolve/main/lib/spec-schema.ts
751 Bytes
| 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>; | |