import type { LlmMessage } from "@uncaged/nerve-workflow-utils"; export type PlannerPromptParams = { nerveAgentContext: string; userPrompt: string; nerveRoot: string; workflowsDir: string; senseGeneratorReference: string; nerveYaml: string; }; export function plannerPrompt({ nerveAgentContext, userPrompt, nerveRoot, workflowsDir, senseGeneratorReference, nerveYaml, }: PlannerPromptParams): LlmMessage[] { const content = `Design a Nerve workflow plan from this request. ${nerveAgentContext} User request: ${userPrompt} Target root: ${nerveRoot} Workflow dir root: ${workflowsDir} Reference structure: \`\`\`ts ${senseGeneratorReference.slice(0, 18_000)} \`\`\` Current nerve.yaml: \`\`\`yaml ${nerveYaml} \`\`\` Produce a complete markdown plan that includes: - workflow name - roles list - flow/transitions - validation loops design - external deps - data flow`; return [{ role: "user", content }]; }