( rawContent: string, filePath: string, type: MemoryType, )
| 529 | } |
| 530 | |
| 531 | function 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 |
no test coverage detected