Commit Graph
20 Commits
Author SHA1 Message Date
Lum1104andClaude Opus 4.6 c3bece91fc fix(dashboard): add score-based highlight intensity and memoize search nodeMap
Pass search score through to CustomNode for tiered ring highlighting
(bright/medium/dim based on score), and wrap SearchBar's nodeMap in
useMemo to avoid rebuilding it on every render.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:15:46 +08:00
Lum1104andClaude Opus 4.6 4f6214a5ce feat(dashboard): wire core SearchEngine with fuzzy matching and scored highlighting
Replace manual substring search in Zustand store with core SearchEngine
(Fuse.js fuzzy matching). SearchBar now shows a top-5 dropdown with type
badges and relevance bars; closes on Escape/outside click. GraphView
updated to work with SearchResult[] (nodeId+score) instead of string[].
Added sub-path exports to core package.json so the dashboard can import
search/types modules without pulling in Node.js-only dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:09:57 +08:00
Lum1104andClaude Opus 4.6 b6ab0f8b32 feat(skill): scaffold skill package with /understand-chat command
Add the @understand-anything/skill package with context-builder (search +
1-hop expansion + layer resolution), chat prompt builder, skill definition
for Claude Code, and 14 passing tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:00:54 +08:00
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 8876eec80e fix(core): use execFileSync to prevent shell injection and remove dangling edges in merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:47:33 +08:00
Lum1104andClaude Opus 4.6 19357d25a3 feat(core): add staleness detection and incremental graph merging
Add staleness module with three functions:
- getChangedFiles: runs git diff to find files changed since last analysis
- isStale: checks whether the knowledge graph needs re-analysis
- mergeGraphUpdate: incrementally merges new analysis into existing graph
  by replacing nodes/edges for changed files while preserving unchanged ones

Includes 8 tests covering git interaction, error handling, and graph merging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:43:01 +08:00
Lum1104andClaude Opus 4.6 510de2eb1d fix(dashboard): fix import extension and add dagre node position guard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:40:21 +08:00
Lum1104andClaude Opus 4.6 dd252eddc0 feat(dashboard): add dagre auto-layout for hierarchical graph visualization
Replace grid-based node positioning with dagre-powered hierarchical layout
that computes positions based on edge direction (top-to-bottom). This
produces clean, readable graphs instead of the previous chaotic grid pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:35:52 +08:00
Lum1104andClaude Opus 4.6 a243a07d6f feat(core): add fuzzy search engine with Fuse.js
Add SearchEngine class with fuzzy matching across node name, tags,
summary, and languageNotes fields. Supports type filtering, result
limiting, and dynamic re-indexing via updateNodes(). Uses Fuse.js
extended search with OR-token splitting for multi-word queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:29:33 +08:00
Lum1104andClaude Opus 4.6 b41cf15ce9 fix(core): return validated data from loadGraph and fix edge type count comment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:25:33 +08:00
Lum1104andClaude Opus 4.6 c04123366e feat(core): add Zod schema validation for knowledge graph loading
Add runtime validation of knowledge graph JSON using Zod schemas that
mirror every type in types.ts. The loadGraph function now validates
by default (opt-out via { validate: false }) and throws descriptive
errors on invalid data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 18:21:24 +08:00
Lum1104andClaude Opus 4.6 7345d83376 feat(dashboard): add search bar, node info, and main 4-panel layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:58:01 +08:00
Lum1104andClaude Opus 4.6 b07bdc2fb9 feat(dashboard): add code viewer panel with Monaco Editor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:57:53 +08:00
Lum1104andClaude Opus 4.6 377c3c72e6 feat(dashboard): add graph view with React Flow and custom nodes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:57:40 +08:00
Lum1104andClaude Opus 4.6 39dfffc4f4 feat(dashboard): scaffold React + Vite app with Tailwind, Zustand, and core dependency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:51:50 +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
Lum1104andClaude Opus 4.6 801c5e7af3 feat(core): add tree-sitter analyzer plugin for TS/JS
Add TreeSitterPlugin using web-tree-sitter (WASM-based) to extract
structural information from TypeScript and JavaScript files. The plugin
implements the AnalyzerPlugin interface and extracts functions, classes,
imports, exports, and call graphs via AST traversal.

Uses web-tree-sitter instead of native tree-sitter for cross-platform
compatibility (no native compilation required).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:40:29 +08:00
Lum1104andClaude Opus 4.6 a5327ce64d feat(core): add JSON persistence for knowledge graph and meta
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:30:23 +08:00
Lum1104andClaude Opus 4.6 35d0545100 feat(core): add knowledge graph type system and validation tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:25:49 +08:00