Commit Graph
3 Commits
Author SHA1 Message Date
Lum1104andClaude Opus 4.6 839166b229 fix(core): add __tests__ pattern and handle filePath-less nodes in applyLLMLayers
Add __tests__ and __specs__ (plural inside underscores) to Test Layer
patterns for the common convention. Also assign file nodes without
filePath to "Other" layer in applyLLMLayers for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:55:57 +08:00
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
Lum1104andClaude Opus 4.6 e1fd03ec38 feat(core): add graph builder and LLM analysis prompt system
Add GraphBuilder class that assembles KnowledgeGraph from file analysis
results, with support for file/function/class nodes and import/call/contains
edges. Add LLM prompt templates for file and project analysis, along with
robust JSON response parsers that handle markdown fences and invalid input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:47:40 +08:00