* Build the CLAUDE.md prefix message for the classifier. Returns null when * CLAUDE.md is disabled or empty. The content is wrapped in a delimiter that * tells the classifier this is user-provided configuration — actions * described here reflect user intent. cache_control is set because the * co
()
| 458 | * pre-PR behavior. |
| 459 | */ |
| 460 | function buildClaudeMdMessage(): Anthropic.MessageParam | null { |
| 461 | const claudeMd = getCachedClaudeMdContent() |
| 462 | if (claudeMd === null) return null |
| 463 | return { |
| 464 | role: 'user', |
| 465 | content: [ |
| 466 | { |
| 467 | type: 'text', |
| 468 | text: |
| 469 | `The following is the user's CLAUDE.md configuration. These are ` + |
| 470 | `instructions the user provided to the agent and should be treated ` + |
| 471 | `as part of the user's intent when evaluating actions.\n\n` + |
| 472 | `<user_claude_md>\n${claudeMd}\n</user_claude_md>`, |
| 473 | cache_control: getCacheControl({ querySource: 'auto_mode' }), |
| 474 | }, |
| 475 | ], |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * Build the system prompt for the auto mode classifier. |
no test coverage detected