UNPKG

@aaswe/codebase-ai

Version:

AI-Assisted Software Engineering (AASWE) - Rich codebase context for IDE LLMs

111 lines 3.22 kB
/** * RDF Generator * * RDF generator that transforms AST analysis results * into comprehensive .module-knowledge.ttl files optimized for both * Neo4j ingestion and direct LLM consumption. */ import { RDFGenerationOptions, RDFGenerationResult, RDFValidationResult } from './types'; import { AnalysisResult } from '../ast-analyzer/types'; /** * Production-Quality RDF Generator * * Transforms AST analysis results into comprehensive RDF knowledge graphs * with dual optimization for Neo4j storage and LLM consumption. */ export declare class RDFGenerator { private readonly store; private readonly options; private readonly warnings; constructor(options?: Partial<RDFGenerationOptions>); /** * Generate RDF from AST Analysis Result */ generateFromAST(astResult: AnalysisResult, modulePath: string, outputPath?: string): Promise<RDFGenerationResult>; /** * Transform AST Analysis Result to Module Knowledge */ private transformASTToModuleKnowledge; /** * Extract Class Knowledge from AST */ private extractClassKnowledge; /** * Extract Function Knowledge from AST */ private extractFunctionKnowledge; /** * Generate Module RDF Triples */ private generateModuleTriples; /** * Generate Class RDF Triples */ private generateClassTriples; /** * Generate Method RDF Triples */ private generateMethodTriples; /** * Add Business Context Placeholders */ private addBusinessContextPlaceholders; /** * Serialize Store to TTL Format */ private serializeToTTL; /** * Generate Fallback TTL when N3 Writer fails */ private generateFallbackTTL; /** * Format RDF term for TTL output */ private formatTTLTerm; /** * Enhance TTL for LLM Consumption */ private enhanceForLLM; /** * Write TTL to File with Metadata */ private writeToFile; /** * Validate Generated RDF */ validateRDF(rdfContent: string): Promise<RDFValidationResult>; private addTriple; private generateModuleId; private generateHash; private calculateOutputPath; private calculateStatistics; private buildFullyQualifiedName; private determineVisibility; private extractMethodsFromClass; private extractPropertiesFromClass; private extractInterfaceKnowledge; private extractDependencies; private extractExports; private extractImports; private detectArchitecturalPatterns; private createBusinessContextPlaceholder; private calculateQualityMetrics; private buildMethodSignature; private extractReturnType; private extractParameters; private extractAnnotations; private extractDocumentation; private extractSourceLocation; private inferResponsibilities; private detectDesignPatterns; private analyzeSideEffects; /** * Extract Version from Module Path */ private extractVersionFromPath; private generateFunctionTriples; private generateDependencyTriples; private generateComplexityTriples; private generatePropertyTriples; } //# sourceMappingURL=RDFGenerator.d.ts.map