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

Function findProjectMemoryBoundary

src/utils/claudemd.ts:690–709  ·  view source on GitHub ↗
(startPath: string)

Source from the content-addressed store, hash-verified

688}
689
690function findProjectMemoryBoundary(startPath: string): string | null {
691 const fs = getFsImplementation()
692 let currentDir = safeResolvePath(fs, startPath).resolvedPath
693
694 while (true) {
695 if (
696 PROJECT_MEMORY_BOUNDARY_MARKERS.some(marker =>
697 fs.existsSync(join(currentDir, marker)),
698 )
699 ) {
700 return currentDir
701 }
702
703 const parentDir = dirname(currentDir)
704 if (parentDir === currentDir) {
705 return null
706 }
707 currentDir = parentDir
708 }
709}
710
711/**
712 * Checks whether a CLAUDE.md file path is excluded by the claudeMdExcludes setting.

Callers 1

claudemd.tsFile · 0.70

Calls 2

getFsImplementationFunction · 0.85
safeResolvePathFunction · 0.85

Tested by

no test coverage detected