MCPcopy Create free account
hub / github.com/Noumena-Network/code / buildClaudeMdMessage

Function buildClaudeMdMessage

src/utils/permissions/yoloClassifier.ts:462–479  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

460 * pre-PR behavior.
461 */
462function 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.

Callers 1

classifyYoloActionFunction · 0.85

Calls 2

getCachedClaudeMdContentFunction · 0.85
getCacheControlFunction · 0.85

Tested by

no test coverage detected