Files
Understand-Anything/packages/core/src/index.ts
T
Lum1104andClaude Opus 4.6 305fb4055b feat(core): add heuristic and LLM-based layer auto-detection
Add layer-detector module with four exported functions:
- detectLayers: heuristic detection using directory path patterns
- buildLayerDetectionPrompt: generates LLM prompt for layer identification
- parseLayerDetectionResponse: parses LLM JSON response with fence handling
- applyLLMLayers: applies LLM-provided layer definitions to the graph

Includes 10 tests covering all four functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:51:19 +08:00

27 lines
937 B
TypeScript

export * from "./types.js";
export * from "./persistence/index.js";
export { KnowledgeGraphSchema, validateGraph, type ValidationResult } from "./schema.js";
export { TreeSitterPlugin } from "./plugins/tree-sitter-plugin.js";
export { GraphBuilder } from "./analyzer/graph-builder.js";
export {
buildFileAnalysisPrompt,
buildProjectSummaryPrompt,
parseFileAnalysisResponse,
parseProjectSummaryResponse,
} from "./analyzer/llm-analyzer.js";
export type { LLMFileAnalysis, LLMProjectSummary } from "./analyzer/llm-analyzer.js";
export { SearchEngine, type SearchResult, type SearchOptions } from "./search.js";
export {
getChangedFiles,
isStale,
mergeGraphUpdate,
type StalenessResult,
} from "./staleness.js";
export {
detectLayers,
buildLayerDetectionPrompt,
parseLayerDetectionResponse,
applyLLMLayers,
} from "./analyzer/layer-detector.js";
export type { LLMLayerResponse } from "./analyzer/layer-detector.js";