Browse Source

Merge pull request #849 from adikpb/feat/job-board-prompt-cleanup

fix(prompt): remove misleading 'do not poll' instructions
Alvin 3 weeks ago
parent
commit
07f0dab6b2

+ 1 - 1
src/config/constants.ts

@@ -48,7 +48,7 @@ export const POLL_INTERVAL_BACKGROUND_MS = 2000;
 export const MAX_POLL_TIME_MS = 5 * 60 * 1000; // 5 minutes
 export const MAX_POLL_TIME_MS = 5 * 60 * 1000; // 5 minutes
 
 
 // Workflow reminders
 // Workflow reminders
-export const PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!`;
+export const PHASE_REMINDER_TEXT = `!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!`;
 
 
 export function formatSystemReminder(text: string): string {
 export function formatSystemReminder(text: string): string {
   return `<system-reminder>\n${text}\n</system-reminder>`;
   return `<system-reminder>\n${text}\n</system-reminder>`;

+ 5 - 6
src/hooks/__snapshots__/cache-payload.snapshot.test.ts.snap

@@ -2,7 +2,7 @@
 
 
 exports[`cache-impact snapshots (update deliberately — see file header) phase reminder text 1`] = `
 exports[`cache-impact snapshots (update deliberately — see file header) phase reminder text 1`] = `
 "<system-reminder>
 "<system-reminder>
-!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!
+!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!
 </system-reminder>"
 </system-reminder>"
 `;
 `;
 
 
@@ -244,7 +244,7 @@ exports[`cache-impact snapshots (update deliberately — see file header) transf
         "synthetic": true,
         "synthetic": true,
         "text": 
         "text": 
 "<system-reminder>
 "<system-reminder>
-!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!
+!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!
 </system-reminder>"
 </system-reminder>"
 ,
 ,
         "type": "text",
         "type": "text",
@@ -296,7 +296,7 @@ exports[`cache-impact snapshots (update deliberately — see file header) transf
         "synthetic": true,
         "synthetic": true,
         "text": 
         "text": 
 "<system-reminder>
 "<system-reminder>
-!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!
+!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!
 </system-reminder>"
 </system-reminder>"
 ,
 ,
         "type": "text",
         "type": "text",
@@ -391,7 +391,7 @@ exports[`cache-impact snapshots (update deliberately — see file header) transf
         "synthetic": true,
         "synthetic": true,
         "text": 
         "text": 
 "<system-reminder>
 "<system-reminder>
-!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!
+!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!
 </system-reminder>"
 </system-reminder>"
 ,
 ,
         "type": "text",
         "type": "text",
@@ -443,7 +443,7 @@ exports[`cache-impact snapshots (update deliberately — see file header) transf
         "synthetic": true,
         "synthetic": true,
         "text": 
         "text": 
 "<system-reminder>
 "<system-reminder>
-!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. Do not poll running jobs, consume running-job output, or advance dependent work. !END!
+!IMPORTANT! Scheduler workflow: First choose the lightest workflow that fits the work. If direct execution is justified, complete it and verify proportionately. Otherwise: plan lanes/dependencies → dispatch background specialists → track task IDs → wait for hook-driven completion → reconcile terminal results → verify. !END!
 </system-reminder>"
 </system-reminder>"
 ,
 ,
         "type": "text",
         "type": "text",
@@ -467,7 +467,6 @@ exports[`cache-impact snapshots (update deliberately — see file header) transf
 "<system-reminder>
 "<system-reminder>
 ### Background Job Board
 ### Background Job Board
 SENTINEL: background-job-board-v2
 SENTINEL: background-job-board-v2
-Do not poll running jobs. Wait for hook-driven completion, or use cancel_task only for explicit cancellation. Reconcile terminal jobs before final response.
 Completed or reconciled sessions are reusable by alias for the same specialist/context.
 Completed or reconciled sessions are reusable by alias for the same specialist/context.
 Timed-out running sessions are recoverable by alias for safe resume after a live busy signal.
 Timed-out running sessions are recoverable by alias for safe resume after a live busy signal.
 Cancelled or errored sessions are not reusable.
 Cancelled or errored sessions are not reusable.

+ 0 - 1
src/utils/background-job-board.ts

@@ -495,7 +495,6 @@ export class BackgroundJobBoard implements BackgroundJobStore {
       [
       [
         '### Background Job Board',
         '### Background Job Board',
         'SENTINEL: background-job-board-v2',
         'SENTINEL: background-job-board-v2',
-        'Do not poll running jobs. Wait for hook-driven completion, or use cancel_task only for explicit cancellation. Reconcile terminal jobs before final response.',
         'Completed or reconciled sessions are reusable by alias for the same specialist/context.',
         'Completed or reconciled sessions are reusable by alias for the same specialist/context.',
         'Timed-out running sessions are recoverable by alias for safe resume after a live busy signal.',
         'Timed-out running sessions are recoverable by alias for safe resume after a live busy signal.',
         'Cancelled or errored sessions are not reusable.',
         'Cancelled or errored sessions are not reusable.',