diff --git a/workflows/sense-generator/roles/tester/prompt.ts b/workflows/sense-generator/roles/tester/prompt.ts index bcac156..b09365b 100644 --- a/workflows/sense-generator/roles/tester/prompt.ts +++ b/workflows/sense-generator/roles/tester/prompt.ts @@ -4,13 +4,29 @@ export function testerPrompt({ threadId }: { threadId: string }): string { 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\` -Verify the full lifecycle: -1. Check all required sense files exist -2. Check nerve.yaml has the sense config -3. Run \`nerve sense list\` — confirm the sense appears -4. Run \`nerve sense trigger \` — should complete without error -5. Run \`nerve sense query \` — retry up to 20s until rows appear -6. If any step fails, run \`nerve logs\` and include relevant errors +Verify the full lifecycle in this order: + +1. **File check** — all required sense files exist: + - \`senses//src/index.ts\` + - \`senses//src/schema.ts\` + - \`senses//migrations/\` + - \`senses//package.json\` + +2. **Build** — run inside the sense directory: + \`\`\` + cd senses/ && pnpm install --no-cache && pnpm build + \`\`\` + Must produce \`index.js\` at sense root without errors. + +3. **Config check** — \`nerve validate\` passes, confirming nerve.yaml is valid. + +4. **Sense list** — \`nerve sense list\` shows the sense. + +5. **Trigger** — \`nerve sense trigger \` completes without error. + +6. **Query** — \`nerve sense query \` — retry up to 20s until rows appear. + +If any step fails, include the relevant error output. Output a clear summary: what you checked, what passed, what failed, and why.`; } diff --git a/workflows/workflow-generator/roles/tester/prompt.ts b/workflows/workflow-generator/roles/tester/prompt.ts index 684396f..042744e 100644 --- a/workflows/workflow-generator/roles/tester/prompt.ts +++ b/workflows/workflow-generator/roles/tester/prompt.ts @@ -6,22 +6,28 @@ Read the nerve-dev skill for expected file structure: \`cat node_modules/@uncage Get the workflow name from the thread (the planner's output). -Verify the full lifecycle: -1. Check all required workflow files exist: index.ts, package.json, tsconfig.json -2. Check nerve.yaml has the workflow config -3. Run \`nerve workflow list\` — confirm the workflow appears -4. Run \`pnpm build\` inside the workflow directory — must succeed -5. Run \`nerve workflow dry-run \` — should complete without error -6. If any step fails, include the relevant error output +Verify the full lifecycle in this order: -Output a clear summary: what you checked, what passed, what failed, and why. +1. **File check** — all required workflow files exist: + - \`workflows//index.ts\` + - \`workflows//build.ts\` + - \`workflows//moderator.ts\` + - \`workflows//roles/\` with subdirectories + - \`workflows//package.json\` -End your response with a JSON block: -\`\`\`json -{ "passed": true } -\`\`\` -or -\`\`\`json -{ "passed": false } -\`\`\``; +2. **Build** — run inside the workflow directory: + \`\`\` + cd 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. + +4. **Workflow list** — \`nerve workflow list\` shows the workflow. + +5. **Trigger test** — \`nerve workflow trigger --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.`; }