小橘 7fb161cf96 fix: tester prompts — build before list, remove non-existent dry-run command
- Both workflow/sense tester: build first, then validate, then list
- workflow-generator: remove nerve workflow dry-run (doesn't exist)
- sense-generator: add build step before sense list/trigger
2026-04-28 11:04:31 +00:00

34 lines
1.3 KiB
TypeScript

export function testerPrompt({ threadId }: { threadId: string }): string {
return `You are testing a newly generated Nerve workflow end-to-end.
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\`
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:
- \`workflows/<name>/index.ts\`
- \`workflows/<name>/build.ts\`
- \`workflows/<name>/moderator.ts\`
- \`workflows/<name>/roles/\` with subdirectories
- \`workflows/<name>/package.json\`
2. **Build** — run inside the workflow directory:
\`\`\`
cd workflows/<name> && pnpm install --no-cache && pnpm build
\`\`\`
Must produce \`dist/index.js\` without errors.
3. **Config check** — \`nerve validate\` passes, confirming nerve.yaml is valid.
4. **Workflow list** — \`nerve workflow list\` shows the workflow.
5. **Trigger test** — \`nerve workflow trigger <name> --dry-run\` if available, otherwise just confirm the workflow appears in \`nerve workflow status\`.
If any step fails, include the relevant error output.
Output a clear summary: what you checked, what passed, what failed, and why.`;
}