|
|
@@ -12,14 +12,18 @@ describe('orchestrator prompt', () => {
|
|
|
expect(prompt).toContain('ordinary dialogue that does not block work');
|
|
|
});
|
|
|
|
|
|
- test('treats task rejections as routing signals', () => {
|
|
|
+ test('treats specialist rejection reasons as routing input', () => {
|
|
|
const prompt = buildOrchestratorPrompt();
|
|
|
|
|
|
- expect(prompt).toContain('Treat `<task_rejection>` as a routing signal');
|
|
|
- expect(prompt).toContain('inspect only its `<reason>`');
|
|
|
- expect(prompt).not.toContain('recommended_agent');
|
|
|
expect(prompt).toContain(
|
|
|
- 'Never reissue an unchanged task to the same agent',
|
|
|
+ "Treat a specialist's rejection reason as routing input",
|
|
|
+ );
|
|
|
+ expect(prompt).toContain('reroute or clarify');
|
|
|
+ expect(prompt).not.toContain('task_rejection');
|
|
|
+ expect(prompt).not.toContain('<reason>');
|
|
|
+ expect(prompt).not.toMatch(/recommended[_ -]?agent/i);
|
|
|
+ expect(prompt).toContain(
|
|
|
+ 'Never reissue an unchanged task to the same specialist',
|
|
|
);
|
|
|
});
|
|
|
});
|