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

Function isMemoryFilePath

src/utils/claudemd.ts:1604–1625  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

1602 * NCODE.md, CLAUDE.local.md, or .ncode rules files (legacy .claude rules files).
1603 */
1604export function isMemoryFilePath(filePath: string): boolean {
1605 const name = basename(filePath)
1606
1607 if (
1608 name === 'AGENTS.md' ||
1609 name === 'CLAUDE.md' ||
1610 name === 'NCODE.md' ||
1611 name === 'CLAUDE.local.md'
1612 ) {
1613 return true
1614 }
1615
1616 if (
1617 name.endsWith('.md') &&
1618 (filePath.includes(`${sep}.claude${sep}rules${sep}`) ||
1619 filePath.includes(`${sep}.ncode${sep}rules${sep}`))
1620 ) {
1621 return true
1622 }
1623
1624 return false
1625}
1626
1627/**
1628 * Get all memory file paths from both standard discovery and readFileState.

Callers 1

getAllMemoryFilePathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected