(filePath: string)
| 1433 | * Check if a file path is a memory file (CLAUDE.md, CLAUDE.local.md, or .claude/rules/*.md) |
| 1434 | */ |
| 1435 | export function isMemoryFilePath(filePath: string): boolean { |
| 1436 | const name = basename(filePath) |
| 1437 | |
| 1438 | // CLAUDE.md or CLAUDE.local.md anywhere |
| 1439 | if (name === 'CLAUDE.md' || name === 'CLAUDE.local.md') { |
| 1440 | return true |
| 1441 | } |
| 1442 | |
| 1443 | // .md files in .claude/rules/ directories |
| 1444 | if ( |
| 1445 | name.endsWith('.md') && |
| 1446 | filePath.includes(`${sep}.claude${sep}rules${sep}`) |
| 1447 | ) { |
| 1448 | return true |
| 1449 | } |
| 1450 | |
| 1451 | return false |
| 1452 | } |
| 1453 | |
| 1454 | /** |
| 1455 | * Get all memory file paths from both standard discovery and readFileState. |
no outgoing calls
no test coverage detected