@felixgeelhaar/cclint
Version:
Catch CLAUDE.md drift before Claude misbehaves. Lints CLAUDE.md, skills, subagents, and hooks for Claude Code projects.
57 lines • 1.84 kB
TypeScript
import type { Rule } from '../domain/Rule.js';
import { ContextFile } from '../domain/ContextFile.js';
import { Violation } from '../domain/Violation.js';
/**
* Rule that validates content appropriateness for CLAUDE.md files
*
* @remarks
* Validates that CLAUDE.md content:
* - Is specific and actionable (not overly generic)
* - Belongs in CLAUDE.md vs README or other docs
* - Follows "frequently used prompt" refinement principle
* - Is concise and focused
*
* @see {@link https://www.anthropic.com/engineering/claude-code-best-practices | Claude Code Best Practices}
*
* @category Rules
*/
export declare class ContentAppropriatenessRule implements Rule {
readonly id = "content-appropriateness";
readonly description = "Validates that content is appropriate for CLAUDE.md and not overly generic";
private readonly maxFileSize;
private readonly maxSectionSize;
constructor(options?: ContentAppropriatenessOptions);
appliesTo(file: ContextFile): boolean;
lint(file: ContextFile): Violation[];
/**
* Check if file is too large
*/
private checkFileSize;
/**
* Check for overly generic instructions
*/
private checkGenericInstructions;
/**
* Check for content that should be in README or other docs
*/
private checkMisplacedContent;
/**
* Check section sizes
*/
private checkSectionSizes;
/**
* Check for actionable content
*/
private checkActionability;
/**
* Extract sections from file
*/
private extractSections;
}
export interface ContentAppropriatenessOptions {
/** Maximum recommended file size in characters */
maxFileSize?: number;
/** Maximum recommended section size in characters */
maxSectionSize?: number;
}
//# sourceMappingURL=ContentAppropriatenessRule.d.ts.map