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

Function stripOperationalProjectInstructions

src/utils/claudemd.ts:531–550  ·  view source on GitHub ↗
(
  rawContent: string,
  filePath: string,
  type: MemoryType,
)

Source from the content-addressed store, hash-verified

529}
530
531function stripOperationalProjectInstructions(
532 rawContent: string,
533 filePath: string,
534 type: MemoryType,
535): { content: string; stripped: boolean } {
536 if (type !== 'Project') {
537 return { content: rawContent, stripped: false }
538 }
539
540 const headingsToStrip =
541 PROJECT_MEMORY_SECTION_HEADINGS_TO_STRIP[
542 basename(filePath) as 'AGENTS.md' | 'CLAUDE.md'
543 ]
544
545 if (!headingsToStrip) {
546 return { content: rawContent, stripped: false }
547 }
548
549 return stripMarkdownSectionsByHeading(rawContent, headingsToStrip)
550}
551
552// Extract @path include references from pre-lexed tokens and resolve to
553// absolute paths. Skips html tokens so @paths inside block comments are

Callers 1

Calls 1

Tested by

no test coverage detected