/** * SMI-1788: SkillAnalyzer Helpers * * Tool detection patterns, thresholds, and utility functions * for skill analysis and optimization. */ import type { ConfidenceLevel } from './SkillAnalyzer.types.js'; /** * Tool detection patterns for analyzing skill content */ export declare const TOOL_PATTERNS: Record; /** * Thresholds for optimization decisions */ export declare const THRESHOLDS: { /** Maximum lines before recommending decomposition */ readonly maxLinesBeforeDecompose: 500; /** Minimum lines for an extractable section */ readonly minSectionLines: 50; /** Heavy tool usage count that suggests subagent */ readonly heavyToolUsageCount: 5; /** Sequential Task() calls that should be parallelized */ readonly sequentialTaskThreshold: 2; /** Minimum optimization score to recommend transformation */ readonly minTransformScore: 30; /** Large examples section threshold */ readonly largeExamplesThreshold: 200; }; /** * Escape special regex characters in a string * @param str - String to escape * @returns Escaped string safe for use in RegExp */ export declare function escapeRegex(str: string): string; /** * Determine confidence level based on match count * @param matchCount - Number of detected tools * @returns Confidence level */ export declare function getConfidenceLevel(matchCount: number): ConfidenceLevel; /** * Estimate examples lines by looking for code blocks * @param content - Full skill content * @returns Estimated number of lines in code blocks */ export declare function estimateExamplesLines(content: string): number; /** * Detect tools in content * @param content - Skill content to analyze * @returns Object with detected tools and total weight */ export declare function detectTools(content: string): { tools: string[]; totalWeight: number; }; /** * Count specific command patterns in content * @param content - Skill content to analyze * @returns Counts for bash, read, and write commands */ export declare function countCommandPatterns(content: string): { bashCommandCount: number; fileReadCount: number; fileWriteCount: number; }; /** * Determine if tool usage suggests a subagent would be beneficial * @param bashCount - Number of bash commands * @param fileOpCount - Total file operations (read + write) * @param totalWeight - Total tool weight * @returns Whether subagent is suggested */ export declare function shouldSuggestSubagent(bashCount: number, fileOpCount: number, totalWeight: number): boolean; /** * Count sequential Task() calls in content * @param content - Skill content to analyze * @returns Count of sequential Task calls */ export declare function countSequentialTaskCalls(content: string): number; /** * Calculate batch savings percentage * @param sequentialCalls - Number of sequential Task calls * @returns Estimated savings percentage */ export declare function calculateBatchSavings(sequentialCalls: number): number; /** * Determine extraction reason for a section * @param sectionName - Name of the section * @param lineCount - Number of lines in section * @returns Human-readable extraction reason */ export declare function getExtractionReason(sectionName: string, lineCount: number): string; /** * Calculate extraction priority based on size ratio * @param lineCount - Section line count * @param totalLines - Total document lines * @returns Priority (1 = highest, 3 = lowest) */ export declare function calculateExtractionPriority(lineCount: number, totalLines: number): number; //# sourceMappingURL=SkillAnalyzer.helpers.d.ts.map