diff --git a/workflows/workflow-generator/roles/tester/prompt.ts b/workflows/workflow-generator/roles/tester/prompt.ts index 749e416..b0adb72 100644 --- a/workflows/workflow-generator/roles/tester/prompt.ts +++ b/workflows/workflow-generator/roles/tester/prompt.ts @@ -1,14 +1,16 @@ -export function testerPrompt({ threadId }: { threadId: string }): string { +export function testerPrompt({ threadId, nerveRoot }: { threadId: string; nerveRoot: string }): string { return `You are testing a Nerve workflow — either newly created or recently modified. +**IMPORTANT: The Nerve workspace is at \`${nerveRoot}\`. All paths below are relative to this directory. Always \`cd ${nerveRoot}\` first.** + Read the workflow thread for context: \`nerve thread ${threadId}\` -Read the nerve-dev skill for expected file structure: \`cat node_modules/@uncaged/nerve-skills/nerve-dev/SKILL.md\` +Read the nerve-dev skill for expected file structure: \`cat ${nerveRoot}/node_modules/@uncaged/nerve-skills/nerve-dev/SKILL.md\` Get the workflow name from the thread (the planner's output). Verify the full lifecycle in this order: -1. **File check** — all required workflow files exist: +1. **File check** — all required workflow files exist (under \`${nerveRoot}/\`): - \`workflows//index.ts\` - \`workflows//build.ts\` - \`workflows//moderator.ts\` @@ -17,11 +19,11 @@ Verify the full lifecycle in this order: 2. **Build** — run inside the workflow directory: \`\`\` - cd workflows/ && pnpm install --no-cache && pnpm build + cd ${nerveRoot}/workflows/ && pnpm install --no-cache && pnpm build \`\`\` Must produce \`dist/index.js\` without errors. -3. **Config check** — \`nerve validate\` passes, confirming nerve.yaml is valid. +3. **Config check** — \`cd ${nerveRoot} && nerve validate\` passes, confirming nerve.yaml is valid. 4. **Workflow list** — \`nerve workflow list\` shows the workflow.