/** * Skill Evaluator * * ACT-R Knowledge Compilation 이론 기반으로, 반복적으로 사용되는 메모리 패턴을 * 자동으로 스킬(절차적 지식)로 결정화하는 엔진. * * 파이프라인: * 1. 대상 메모리 수집 (임베딩 있는 메모리) * 2. Greedy Agglomerative 클러스터링 * 3. 5조건 AND 평가 * 4. LLM 검증 (옵션) * 5. N:1 압축하여 skill 메모리 생성 */ import type { MemoryDatabase } from '../db/database.js'; import type { A2AConfig, Memory } from '../types/index.js'; import type { SkillCandidate, SkillMetadata, EvaluationResult, ReviewResult } from './types.js'; import type { A2AClient } from '../sync/client.js'; export declare class SkillEvaluator { private db; private config; constructor(db: MemoryDatabase, config: A2AConfig); /** * 메인 평가 파이프라인 */ evaluate(projectPath?: string, client?: A2AClient): Promise; /** * Greedy Agglomerative 클러스터링 * 코사인 유사도 ≥ threshold인 메모리들을 같은 클러스터로 그룹화 */ clusterMemories(memories: Memory[], threshold: number): Memory[][]; /** * 3-AND + 2-Optional 평가 (기존 5-AND에서 완화) * 필수(AND): 1. 반복 횟수, 2. 평균 유사도(0.75), 3. 기본 신뢰도(0.5) * 보너스(Optional): 4. 다중 세션(×1.2), 5. 일관된 카테고리(×1.1) */ evaluateCluster(cluster: Memory[], minRepetitions: number, _minConfidence: number): SkillCandidate | null; /** * LLM으로 스킬 유효성 검증 */ validateWithLLM(candidate: SkillCandidate): Promise; /** * N:1 압축하여 skill 메모리 생성 */ compressToSkill(candidate: SkillCandidate, client?: A2AClient): Promise; /** * 90일 주기 재평가: 비활성 스킬 강등 */ reviewSkills(): ReviewResult; private computeAverageSimilarity; private isDuplicateSkill; private buildSkillContent; extractMetadata(skill: Memory): SkillMetadata | null; private averageEmbeddings; /** * 스킬 자동 갱신: 새 메모리가 기존 스킬과 유사하면 소스에 추가 * * PostToolUse에서 새 메모리 생성 후 호출. * 유사도 > 0.8인 스킬이 있으면 sourceMemoryIds에 추가하고 content 재생성. */ absorbIntoSkill(newMemory: Memory): { absorbed: boolean; skillId?: string; }; } //# sourceMappingURL=evaluator.d.ts.map