export const REVIEW_SUMMARY_START_TOKEN = "<<>>"; export const REVIEW_SUMMARY_END_TOKEN = "<<>>"; export const FIX_SUMMARY_START_TOKEN = "<<>>"; export const FIX_SUMMARY_END_TOKEN = "<<>>"; export function createReviewerStructuredOutputInstructions(): string { return ` ## Structured output protocol (STRICT) - Output MUST be one JSON object that matches the required schema. - Wrap that JSON object using these exact delimiters: - ${REVIEW_SUMMARY_START_TOKEN} - ${REVIEW_SUMMARY_END_TOKEN} - Do not include markdown fences. - Do not include any text before the start token or after the end token. - For each finding code_location.line_range, start and end MUST be integers and end MUST be greater than or equal to start.`; } export function createFixerStructuredOutputInstructions(): string { return ` ## Structured output protocol (STRICT) - Output MUST be one JSON object that matches the required schema. - Wrap that JSON object using these exact delimiters: - ${FIX_SUMMARY_START_TOKEN} - ${FIX_SUMMARY_END_TOKEN} - Do not wrap the JSON in markdown fences. - The delimited JSON block MUST be the final output in the response.`; } export function createReviewerSummaryRetryReminder(): string { return ` IMPORTANT: Your previous response was missing or invalid structured JSON output. Return ONLY one schema-valid JSON object wrapped in: ${REVIEW_SUMMARY_START_TOKEN} ${REVIEW_SUMMARY_END_TOKEN}`; } export function createFixerSummaryRetryReminder(): string { return ` IMPORTANT: Your previous response was missing or invalid structured JSON output. Do not make additional file edits in this retry. Return ONLY one schema-valid JSON object wrapped in: ${FIX_SUMMARY_START_TOKEN} ${FIX_SUMMARY_END_TOKEN}`; }