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

Function getConditionalRulesForCwdLevelDirectory

src/utils/claudemd.ts:1491–1509  ·  view source on GitHub ↗
(
  dir: string,
  targetPath: string,
  processedPaths: Set<string>,
)

Source from the content-addressed store, hash-verified

1489 * @returns Array of MemoryFileInfo objects
1490 */
1491export async function getConditionalRulesForCwdLevelDirectory(
1492 dir: string,
1493 targetPath: string,
1494 processedPaths: Set<string>,
1495): Promise<MemoryFileInfo[]> {
1496 const result: MemoryFileInfo[] = []
1497 for (const rulesDir of getProjectInstructionRuleDirsLowToHigh(dir)) {
1498 result.push(
1499 ...(await processConditionedMdRules(
1500 targetPath,
1501 rulesDir,
1502 'Project',
1503 processedPaths,
1504 false,
1505 )),
1506 )
1507 }
1508 return result
1509}
1510
1511/**
1512 * Processes all .md files in the .ncode/rules/ directory and legacy .claude/rules/

Callers 1

Tested by

no test coverage detected