* Build the NCODE.md / legacy CLAUDE.md prefix message for the classifier. * Returns null when memory-file context 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_c
()
| 460 | * pre-PR behavior. |
| 461 | */ |
| 462 | function buildClaudeMdMessage(): Anthropic.MessageParam | null { |
| 463 | const claudeMd = getCachedClaudeMdContent() |
| 464 | if (claudeMd === null) return null |
| 465 | return { |
| 466 | role: 'user', |
| 467 | content: [ |
| 468 | { |
| 469 | type: 'text', |
| 470 | text: |
| 471 | `The following is the user's NCODE.md / legacy CLAUDE.md configuration. These are ` + |
| 472 | `instructions the user provided to the agent and should be treated ` + |
| 473 | `as part of the user's intent when evaluating actions.\n\n` + |
| 474 | `<user_claude_md>\n${claudeMd}\n</user_claude_md>`, |
| 475 | cache_control: getCacheControl({ querySource: 'auto_mode' }), |
| 476 | }, |
| 477 | ], |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | /** |
| 482 | * Build the system prompt for the auto mode classifier. |
no test coverage detected