diff --git a/workflows/workflow-generator/index.ts b/workflows/workflow-generator/index.ts index 5d34c9d..61dcb9b 100644 --- a/workflows/workflow-generator/index.ts +++ b/workflows/workflow-generator/index.ts @@ -561,6 +561,7 @@ ${fixSection} ## Implementation patterns (when applicable) - \`resolveDashScopeProvider\`, \`nerveAgentContext\`, \`readNerveYaml\`, \`cursorAgent\`, \`llmExtract\`, \`spawnSafe\`, \`formatSpawnFailure\` from \`@uncaged/nerve-workflow-utils\` as in sense-generator. - No dynamic \`import()\` in the new workflow code. +- **Every zod schema passed to \`llmExtract\` MUST have \`.default()\` on all fields** (especially arrays and objects). This ensures \`dryRun\` mode returns structurally valid data instead of empty primitives. Example: \`z.array(roleSchema).default([])\`, \`z.string().default("unknown")\`. ## Reference workflow \`\`\`ts