@felixgeelhaar/cclint
Version:
Catch CLAUDE.md drift before Claude misbehaves. Lints CLAUDE.md, skills, subagents, and hooks for Claude Code projects.
56 lines • 1.69 kB
TypeScript
import type { Rule } from '../domain/Rule.js';
import { ContextFile } from '../domain/ContextFile.js';
import { Violation } from '../domain/Violation.js';
/**
* Rule that validates CLAUDE.md hierarchy in monorepos
*
* @remarks
* Validates that multiple CLAUDE.md files:
* - Don't create conflicting instructions
* - Use proper hierarchy (parent/child relationships)
* - Consider using imports instead of duplication
* - Follow Anthropic's monorepo best practices
*
* @see {@link https://www.anthropic.com/engineering/claude-code-best-practices | Claude Code Best Practices}
*
* @category Rules
*/
export declare class MonorepoHierarchyRule implements Rule {
readonly id = "monorepo-hierarchy";
readonly description = "Validates CLAUDE.md file hierarchy in monorepos";
appliesTo(file: ContextFile): boolean;
lint(file: ContextFile): Violation[];
/**
* Find CLAUDE.md files in hierarchy
*/
private findHierarchyFiles;
/**
* Recursively search for child CLAUDE.md files
*/
private searchChildren;
/**
* Check for conflicts with parent CLAUDE.md files
*/
private checkParentConflicts;
/**
* Check children organization
*/
private checkChildrenOrganization;
/**
* Check for duplication across siblings
*/
private checkSiblingDuplication;
/**
* Provide monorepo guidance
*/
private provideMonorepoGuidance;
/**
* Extract instruction topics from file
*/
private extractInstructions;
/**
* Find overlapping topics between two sets of instructions
*/
private findTopicOverlap;
}
//# sourceMappingURL=MonorepoHierarchyRule.d.ts.map