UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

82 lines 2.45 kB
/** * Validation Rules Module * * Loads and manages validation rules from AIWG markdown files. * Provides structured rule definitions for banned phrases, AI patterns, and authenticity markers. */ export type ValidationContext = 'academic' | 'technical' | 'executive' | 'casual'; export type RuleType = 'banned_phrase' | 'ai_pattern' | 'authenticity_marker' | 'formulaic_structure'; export type Severity = 'critical' | 'warning' | 'info'; export interface ValidationRule { id: string; type: RuleType; pattern: string | RegExp; severity: Severity; message: string; suggestion?: string; contexts?: ValidationContext[]; category?: string; } export interface RuleSet { bannedPhrases: ValidationRule[]; aiPatterns: ValidationRule[]; authenticityMarkers: ValidationRule[]; structuralPatterns: ValidationRule[]; } /** * Loads validation rules from AIWG markdown files */ export declare class ValidationRuleLoader { private guideBasePath?; private ruleCache; constructor(guideBasePath?: string | undefined); /** * Load complete rule set from AIWG */ loadRuleSet(): Promise<RuleSet>; /** * Load rules from a markdown file */ loadFromMarkdown(path: string): Promise<ValidationRule[]>; /** * Parse markdown content into validation rules */ private parseMarkdownRules; /** * Create a validation rule from a banned phrase */ private createRuleFromPhrase; /** * Load authenticity markers from sophistication guide */ private loadAuthenticityMarkers; /** * Create a regex pattern from a phrase string */ private createPattern; /** * Generate a unique ID from a phrase */ private generateId; /** * Extract suggestion from a line */ private extractSuggestion; /** * Merge multiple rule sets */ mergeRules(rules1: ValidationRule[], rules2: ValidationRule[]): ValidationRule[]; /** * Filter rules by context */ filterByContext(rules: ValidationRule[], context: ValidationContext): ValidationRule[]; /** * Get default rule set (built-in rules when guide is not available) */ getDefaultRules(): RuleSet; private getDefaultBannedPhrases; private getDefaultAIPatterns; private getDefaultAuthenticityMarkers; private getDefaultStructuralPatterns; } //# sourceMappingURL=validation-rules.d.ts.map