Implements the main /understand skill that orchestrates 5 specialized
agents in a 7-phase pipeline to analyze codebases and produce
knowledge-graph.json. Supports full and incremental analysis modes.
- project-scanner (haiku): file discovery, language/framework detection
- file-analyzer (sonnet): code structure extraction, node/edge generation
- architecture-analyzer (sonnet): architectural layer identification
- tour-builder (sonnet): guided learning tour generation
- graph-reviewer (haiku): graph validation and quality checks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SemanticSearchEngine class that stores pre-computed vector embeddings
for graph nodes and performs cosine similarity search. Enables true semantic
queries (e.g., "find code that handles authentication") even when keywords
don't appear in node data. Returns the same SearchResult type as the
existing Fuse.js-based SearchEngine for compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces PluginRegistry class that discovers, registers, and manages
analyzer plugins. Maps file extensions to languages, provides a unified
analyzeFile entrypoint, and supports plugin priority via registration
order. Foundation for the community plugin system.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generates a structured markdown onboarding guide from the knowledge graph,
including project overview, architecture layers, key concepts, guided tour,
file map, and complexity hotspots.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the explain-builder module that constructs rich context for explaining
a specific file or function. Supports file paths and path:function notation,
gathers child nodes, connected components, layer membership, and formats
a structured prompt for LLM-powered deep-dive explanations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds buildDiffContext and formatDiffAnalysis to map git diffs against
the knowledge graph, identifying changed nodes, affected components,
impacted layers, and risk assessment. Includes 11 tests and skill
definition for Claude Code integration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three persona modes change the dashboard experience:
- Overview (non-technical): 2-column layout with graph + learn/chat,
hides CodeViewer, filters graph to concept/module/file nodes only
- Learn (junior): full 4-panel layout with tabbed Details/Tour panel
- Deep Dive (experienced): full 4-panel layout with NodeInfo, tour
tabs only shown when tour is explicitly active
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain blue box with indigo-themed collapsible panel featuring
chevron toggle, matching the indigo design language used in LearnPanel.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire tourHighlightedNodeIds from the store into GraphView and CustomNode
so that nodes referenced by the current tour step get a pulsing blue ring,
visually distinct from the white selection ring and yellow search rings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add detectLanguageConcepts, buildLanguageLessonPrompt, and
parseLanguageLessonResponse to support language-specific lessons tied
to individual graph nodes. Includes 12 concept detection patterns
(async/await, generics, middleware, etc.) and structured LLM prompt
generation with JSON response parsing. 10 new tests, 104 total passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add "Explain This" button to NodeInfo panel that generates a detailed
plain-English explanation of the selected node using Claude API. Explanations
are cached per node ID and cleared on node switch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tour state management (tourActive, currentTourStep, tourHighlightedNodeIds)
to the Zustand store with start/stop/navigate actions. Create LearnPanel
component with three states: no tour, tour preview, and active tour with
step navigation, markdown descriptions, language lesson boxes, and
referenced component pills. Replace bottom-right panel in App.tsx with
tabbed Details/Tour view when a tour is available.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add three exported functions for generating guided codebase tours:
- buildTourGenerationPrompt: builds LLM prompt with project metadata
- parseTourGenerationResponse: parses LLM JSON response with validation
- generateHeuristicTour: topology-based tour using Kahn's algorithm,
with layer grouping and concept node separation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 3 (7 tasks): Tour generation engine, LearnPanel + tour store,
tour player with graph highlighting, contextual node explanations,
language lesson prompts, enhanced language display, persona modes.
Phase 4 (7 tasks): /understand-diff, /understand-explain,
/understand-onboard skills, plugin registry + discovery,
embedding-based semantic search + dashboard integration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rich sample knowledge graph with 20 nodes (all 5 types), 28 edges
(10 edge types), 5 layers, and 6 tour steps themed as a task
management API. Updated CLAUDE.md with skill commands and Phase 2
feature list. Updated README with current status, Phase 2 features,
commands table, and skill usage instructions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Render assistant messages with ReactMarkdown (headers, code blocks,
lists, bold, links, blockquotes) instead of plain whitespace-pre-wrap
- Add "Change Key" button in chat header to clear and re-enter API key
- Document the plain-text localStorage tradeoff for API key storage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>