Skip to main content

qe-code-intelligence

Knowledge graph-based code understanding with semantic search and 80% token reduction through intelligent context retrieval.

소스 정보

저장소
proffesor-for-testing/agentic-qe
최근 소스 활동
2026년 6월 27일 11:27
감지된 SKILL.md 언어
영어
스타
494
포크
98

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
inclusion
auto
name
qe-code-intelligence
description
Knowledge graph-based code understanding with semantic search and 80% token reduction through intelligent context retrieval.
# QE Code Intelligence ## Purpose Guide the use of v3's code intelligence capabilities including knowledge graph construction, semantic code search, dependency mapping, and context-aware code understanding with significant token reduction. ## Activation - When understanding unfamiliar code - When searching for code semantically - When analyzing dependencies - When building code knowledge graphs - When reducing context for AI operations ## Quick Start ```bash # Index codebase into knowledge graph aqe code index src/ --incremental # Semantic code search aqe code search "authentication middleware" # Analyze change impact aqe code impact src/services/UserService.ts --depth 3 # Map dependencies aqe code deps src/ # Analyze complexity and find hotspots aqe code complexity src/ # Generate C4 architecture diagrams (Mermaid) with a confidence score aqe code c4 . ``` ## Agent Workflow ```typescript // Build knowledge graph Task("Index codebase", ` Build knowledge graph for the project: - Parse all TypeScript files in src/ - Extract entities (classes, functions, types) - Map relationships (imports, calls, inheritance) - Generate embeddings for semantic search Store in AgentDB vector database. `, "qe-kg-builder") // Semantic search Task("Find relevant code", ` Search for code related to "user authentication flow": - Use semantic similarity (not just keyword) - Include related functions and types - Rank by relevance score - Return with minimal context (80% token reduction) `, "qe-code-intelligence") ``` ## Knowledge Graph Operations ### 1. Codebase Indexing ```typescript await knowledgeGraph.index({ source: 'src/**/*.ts', extraction: { entities: ['class', 'function', 'interface', 'type', 'variable'], relationships: ['imports', 'calls', 'extends', 'implements', 'uses'], metadata: ['jsdoc', 'complexity', 'lines'] }, embeddings: { model: 'code-embedding', dimensions: 384, normalize: true }, incremental: true // Only index changed files }); ``` ### 2. Semantic Search ```typescript await semanticSearcher.search({ query: 'payment processing with stripe', options: { similarity: 'cosine', threshold: 0.7, limit: 20, includeContext: true }, filters: { fileTypes: ['.ts', '.tsx'], excludePaths: ['node_modules', 'dist'] } }); ``` ### 3. Dependency Analysis ```typescript await dependencyMapper.analyze({ entry: 'src/services/OrderService.ts', depth: 3, direction: 'both', // imports and importedBy output: { graph: true, metrics: { afferentCoupling: true, efferentCoupling: true, instability: true } } }); ``` ## Token Reduction Strategy ```typescript // Get context with 80% token reduction const context = await codeIntelligence.getOptimizedContext({ query: 'implement user registration', budget: 4000, // max tokens strategy: { relevanceRanking: true, summarization: true, codeCompression: true, deduplication: true }, include: { signatures: true, implementations: 'relevant-only', comments: 'essential', examples: 'top-3' } }); ``` ## Knowledge Graph Schema ```typescript interface KnowledgeGraph { entities: { id: string; type: 'class' | 'function' | 'interface' | 'type' | 'file'; name: string; file: string; line: number; embedding: number[]; metadata: Record<string, any>; }[]; relationships: { source: string; target: string; type: 'imports' | 'calls' | 'extends' | 'implements' | 'uses'; weight: number; }[]; indexes: { byName: Map<string, string[]>; byFile: Map<string, string[]>; byType: Map<string, string[]>; }; } ``` ## Search Results ```typescript interface SearchResult { entity: { name: string; type: string; file: string; line: number; }; relevance: number; snippet: string; context: { before: string[]; after: string[]; related: string[]; }; explanation: string; } ``` ## CLI Examples ```bash # Full reindex aqe code index src/ # Incremental index (changed files only) aqe code index src/ --incremental # Index only files changed since a git ref aqe code index . --git-since HEAD~5 # Semantic code search aqe code search "database connection" # Change impact analysis aqe code impact src/services/UserService.ts # Dependency mapping aqe code deps src/ --depth 5 # Complexity metrics and hotspots aqe code complexity src/ --format json ``` ## Coordination **Primary Agents**: qe-kg-builder, qe-dependency-mapper, qe-impact-analyzer, qe-code-complexity **Coordinator**: qe-code-intelligence **Related Skills**: qe-test-generation, qe-defect-intelligence
GitHub에서 보기