export type CoderPromptParams = { workflowsDir: string; wfName: string; planMarkdown: string; plannerStructured: object; feedback: string; nerveRoot: string; }; export function coderPrompt({ workflowsDir, wfName, planMarkdown, plannerStructured, feedback, nerveRoot, }: CoderPromptParams): string { return `Implement a Nerve workflow package under ${workflowsDir}/${wfName}/. Planner output: ${planMarkdown} Structured planner fields: ${JSON.stringify(plannerStructured, null, 2)} ${feedback} Required files: 1) ${workflowsDir}/${wfName}/index.ts 2) ${workflowsDir}/${wfName}/package.json 3) ${workflowsDir}/${wfName}/tsconfig.json 4) update ${nerveRoot}/nerve.yaml with workflows.${wfName} Rules: - keep WorkflowDefinition pattern - no dynamic import() - use types (not interfaces) - include retry-aware moderator routing - write compile-ready TypeScript`; }