Commit Graph
216 Commits
Author SHA1 Message Date
Lum1104andClaude Opus 4.7 bdba4795e2 chore: bump to 2.3.2 and sync version manifest list
Bumps all five version-carrying manifests to 2.3.2, bringing
.copilot-plugin/plugin.json back in sync (was stuck at 2.2.0), and
updates CLAUDE.md to reflect the true set of files that must move
together: the nested understand-anything-plugin/.claude-plugin/plugin.json
and .copilot-plugin/plugin.json were missing, and marketplace.json was
incorrectly listed (its plugins[] entry does not support a version field).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:13:58 +08:00
0xnayuta d9250d76a9 fix(skills): harden plugin root resolution across install modes 2026-04-22 11:19:07 +08:00
0xnayuta 6a071b5abd chore(pi): improve plugin root error message 2026-04-20 20:20:54 +08:00
0xnayuta a2071fbf3c fix(pi): resolve understand plugin root via symlink-safe logic 2026-04-20 20:08:20 +08:00
Lum1104andClaude Opus 4.7 4233e8668d perf(dashboard): code-split bundle to drop initial chunk under warning threshold
Split the single 770 kB dashboard bundle into named vendor chunks and
lazy-load optional views so the initial JS payload is smaller and stays
under Vite's 500 kB warning threshold.

- vite manualChunks: react-vendor, xyflow, graph-layout, markdown
- React.lazy for CodeViewer, LearnPanel, PathFinderModal, KeyboardShortcutsHelp
- PathFinderModal now only mounts while open (was always mounted)

Before: index 769.80 kB (gzip 235.12 kB), chunks-too-large warning.
After:  index 205 kB + split vendor/lazy chunks, warning gone.

Fixes #86

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:40:15 +08:00
Lum1104andClaude Opus 4.7 dbb4e94808 chore: migrate homepage and demo to understand-anything.com
Drops the /Understand-Anything subpath and retargets the site at the
apex custom domain served through GitHub Pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 12:23:41 +08:00
0xnayuta aef6f88e90 fix(skill): quote understand argument-hint yaml 2026-04-18 22:21:09 +08:00
Lum1104 aebd6dcb3c fix(understand): preflight build of core package on first run 2026-04-17 14:33:23 +08:00
Lum1104andClaude Opus 4.7 f9b027245e chore: sync pnpm-lock.yaml with package.json
Lockfile was missing entries for tree-sitter language parsers
(c-sharp, cpp, go, java, php, python, ruby, rust) that were already
declared in packages/core/package.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 10:38:26 +08:00
Lum1104andClaude Opus 4.6 45e56a4624 fix: allow /understand to target an arbitrary directory path
Previously, PROJECT_ROOT was always set to CWD, which broke on
alternative CLIs (e.g. OpenClaw) that set CWD to their own workspace
directory. Now Phase 0 parses $ARGUMENTS for a non-flag directory path
and uses it as PROJECT_ROOT, falling back to CWD when omitted.

Closes #90

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:56:53 +08:00
Lum1104andClaude Opus 4.6 a2907ec76f fix: PHP namespace block extraction, C/C++ language split, and Lua config
- Handle block-scoped PHP namespaces (`namespace Foo { class Bar {} }`)
  by recursing into compound_statement bodies in PhpExtractor
- Separate C (.c/.h) from C++ (.cpp/.cc/.hpp) into distinct language
  configs so .c/.h files resolve to language "c" instead of "cpp"
- Add Lua language config so .lua files resolve to "lua" instead of
  "unknown" after the EXTENSION_LANGUAGE map was replaced by LanguageRegistry
- Update TreeSitterPlugin JSDoc to reflect all 10 supported languages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 14:40:24 +08:00
Lum1104andClaude Opus 4.6 11d2e95720 feat: export LanguageExtractor type and builtinExtractors from core package
Completes the language extractor architecture — 10 languages with
tree-sitter support (TS, JS, Python, Go, Rust, Java, Ruby, PHP, C/C++, C#).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:27:33 +08:00
Lum1104andClaude Opus 4.6 20c1567143 feat: file-analyzer uses bundled tree-sitter script instead of LLM-generated regex
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:26:39 +08:00
Lum1104andClaude Opus 4.6 f4b79e1d92 feat: add bundled tree-sitter extraction script for file-analyzer agent
Replaces the LLM-generated throwaway regex scripts in Phase 1 of the
file-analyzer with a deterministic script that uses PluginRegistry
(TreeSitterPlugin + all non-code parsers) from @understand-anything/core.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:23:49 +08:00
Lum1104andClaude Opus 4.6 4ff04b251e feat: create extractor index with builtinExtractors, wire all 9 extractors into TreeSitterPlugin
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:20:42 +08:00
Lum1104andClaude Opus 4.6 3e4f7b6c02 feat: add CSharpExtractor for tree-sitter C# structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:19:24 +08:00
Lum1104andClaude Opus 4.6 48e1daa838 feat: add CppExtractor for tree-sitter C/C++ structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:13:59 +08:00
Lum1104andClaude Opus 4.6 4eb35b0437 feat: add PhpExtractor for tree-sitter PHP structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:08:51 +08:00
Lum1104andClaude Opus 4.6 dc8dd7dd77 feat: add RubyExtractor for tree-sitter Ruby structural analysis
Handles methods, classes, modules, attr_* properties, require imports,
and call graph including bare identifier calls (no-arg method invocations).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:02:52 +08:00
Lum1104andClaude Opus 4.6 6e500cbfdf feat: add JavaExtractor for tree-sitter Java structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:42:55 +08:00
Lum1104andClaude Opus 4.6 a1fb9585d3 feat: add RustExtractor for tree-sitter Rust structural analysis
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:38:26 +08:00
Lum1104andClaude Opus 4.6 f18cad61d5 feat: add GoExtractor for tree-sitter Go structural analysis
Implements the LanguageExtractor interface for Go, handling functions,
methods with receivers, structs, interfaces, imports, exports (via
capitalization convention), and call graph extraction. Includes 25 tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:33:18 +08:00
Lum1104andClaude Opus 4.6 398f5b15b0 feat: add PythonExtractor for tree-sitter Python structural analysis
Implements the LanguageExtractor interface for Python, extracting functions
(with type annotations, defaults, *args/**kwargs), classes (methods +
annotated properties), imports (plain, from, aliased, wildcard), exports
(top-level defs), and caller-callee call graphs. Includes 31 tests using
the real tree-sitter parser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:28:38 +08:00
Lum1104andClaude Opus 4.6 2ad0563878 feat: add tree-sitter grammar deps and treeSitter configs for 10 languages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:22:51 +08:00
Lum1104andClaude Opus 4.6 9376375c8c feat: add extractCallGraph to PluginRegistry, derive DEFAULT_PLUGIN_CONFIG from configs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:20:31 +08:00
Lum1104andClaude Opus 4.6 ab011ff856 refactor: move TS/JS extraction logic to TypeScriptExtractor, dispatch via LanguageExtractor interface
Extract all TypeScript/JavaScript-specific AST extraction functions
(extractParams, extractReturnType, extractImportSpecifiers, processTopLevelNode,
extractFunction, extractClass, extractVariableDeclarations, extractImport,
processExportStatement, and call graph walking) from TreeSitterPlugin into the
new TypeScriptExtractor class. TreeSitterPlugin now dispatches to registered
LanguageExtractor instances, defaulting to TypeScriptExtractor for backward
compatibility. All 426 existing tests pass unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:17:09 +08:00
Lum1104andClaude Opus 4.6 4f954907ec feat: add LanguageExtractor interface and shared base utilities
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:12:07 +08:00
Lum1104andClaude Opus 4.6 6cba6de658 refactor: replace hardcoded EXTENSION_LANGUAGE map in GraphBuilder with LanguageRegistry
GraphBuilder maintained its own ~60-line extension-to-language mapping that
duplicated and could diverge from the canonical LanguageRegistry. Now delegates
language detection to LanguageRegistry.getForFile(), eliminating the duplication
and ensuring new language configs are automatically picked up everywhere.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 17:30:38 +08:00
JohnWongandClaude Opus 4.6 61a28c7d6c fix: include access token in auto-opened dashboard URL
CLI --open overrides server.open config, stripping the token. Remove
--open from CLI and set server.open to /?token= so the browser opens
with the access token already included.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 23:22:05 +08:00
Nikola Chetelyazov d11a9bb1c9 refactor: extract addChildNode helper to remove repeated boilerplate
All five child-node loops in addNonCodeFileWithAnalysis shared the same four-line pattern: dedup check, nodeIds.add, nodes.push, and a contains edge push. A private addChildNode helper centralises this so each loop only constructs the node object specific to its type.
2026-04-13 09:56:12 +03:00
Nikola Chetelyazov 45b98716ec fix: use localeCompare in languages sort for reliable alphabetical order
Default sort() uses Unicode code point ordering which can produce unexpected results for non-ASCII strings. localeCompare guarantees correct alphabetical ordering regardless of character set.
2026-04-13 09:52:13 +03:00
Nikola Chetelyazov e82235e1df refactor: return shallow copies of nodes and edges from build()
build() was returning direct references to the builder's internal arrays, allowing callers to mutate graph.nodes or graph.edges and corrupt the builder's state. Spreading into new arrays at build time prevents this at negligible cost.
2026-04-13 09:49:47 +03:00
Nikola Chetelyazov ef0c65aa17 refactor: deduplicate import and call edges via edgeKeys set
addImportEdge and addCallEdge previously pushed edges unconditionally, allowing duplicate relationships if multiple agents reported the same import or call. A shared edgeKeys set keyed on type|source|target silently skips any edge that has already been recorded.
2026-04-13 09:47:16 +03:00
Nikola Chetelyazov 5593af76ca refactor: extract endpoint label into variable to avoid duplicated template
The endpoint name template was evaluated twice — once for name and once for summary. A single const removes the duplication and resolves the nested template literal lint warning.
2026-04-13 09:44:17 +03:00
Nikola Chetelyazov 6c55ee303a refactor: return fileId from addNonCodeFile instead of recomputing it
addNonCodeFileWithAnalysis was reconstructing the fileId string independently of addNonCodeFile, creating a silent correctness risk if the ID construction logic ever changed. addNonCodeFile now returns the ID it used so the caller cannot go out of sync.
2026-04-13 09:41:12 +03:00
Nikola Chetelyazov 82b1d06777 refactor: extract basename helper to replace repeated split/pop pattern
The same filePath.split("/").pop() ?? filePath expression appeared three times across addFile, addFileWithAnalysis, and addNonCodeFile. A private static helper centralises the logic and makes call sites easier to read.
2026-04-13 09:35:55 +03:00
Nikola Chetelyazov a89555d369 refactor: promote nodeIds to class field to avoid O(n²) set rebuild
Previously addNonCodeFileWithAnalysis rebuilt a full Set from this.nodes on every call, making duplicate checks O(n) per file and O(n²) overall. Moving nodeIds to a class field and updating it incrementally at each insertion reduces duplicate detection to O(1) per check.
2026-04-13 09:33:18 +03:00
Nikola Chetelyazov c96a14c541 refactor: extract KIND_TO_NODE_TYPE as module-level constant in GraphBuilder
Previously the mapping object was recreated on every mapKindToNodeType call. Moving it to module level means it is allocated once at load time instead of once per definition node processed.
2026-04-13 09:28:02 +03:00
jiachenandClaude Opus 4.6 72953254d2 fix: add plugin manifest under understand-anything-plugin/.claude-plugin
marketplace.json declares plugins[0].source as ./understand-anything-plugin,
so Claude Code resolves the plugin manifest at
./understand-anything-plugin/.claude-plugin/plugin.json. That file did not
exist — only .claude-plugin/plugin.json at the repo root — causing
"Marketplace sync failed. Some plugins in this marketplace have validation
errors." when adding the marketplace via /plugin marketplace add.

Adds the manifest at the path the marketplace source expects, so marketplace
sync validates and the plugin can be installed. Version matches the current
root plugin.json (2.3.1).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 17:22:30 +08:00
Lum1104andClaude Opus 4.6 ca5e3b8e21 chore: bump version to 2.3.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:23:50 +08:00
Lum1104andClaude Opus 4.6 55fc2ac848 fix: sync Phase 0.5 inline script with .gitignore integration and header fix
The skill's inline Node.js generator was duplicated from core and missed
the .gitignore seeding and bin/ header fix. Updated the one-liner to read
.gitignore patterns, deduplicate against defaults with trailing-slash
normalization, and remove bin/ from the built-in defaults header comment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:47:55 +08:00
Lum1104andClaude Opus 4.6 6ef1a21315 feat: seed .understandignore with .gitignore patterns on first generation
Read the project's .gitignore at starter-file generation time and include
non-default patterns as commented suggestions in .understandignore. Patterns
already covered by hardcoded defaults are deduplicated (with trailing-slash
normalization). This is a one-time inclusion — users can later remove patterns
for files they want analyzed without the filter re-reading .gitignore.

Also fixes the starter header listing bin/ as a built-in default when it is
intentionally excluded from DEFAULT_IGNORE_PATTERNS (bin/ is used by Node/Ruby
CLI launchers).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:39:31 +08:00
Lum1104 bc311c80ad Merge branch 'main' into feat/understandignore 2026-04-12 11:34:10 +08:00
Lum1104andClaude Opus 4.6 1d15851905 fix: highlight connected edges on node selection in knowledge view
Connected edges now highlight (thicker, full opacity) when a node is
selected/focused. Unconnected edges dim to near-invisible. Edge labels
only show on connected edges to reduce visual noise.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:24:17 +08:00
Lum1104andClaude Opus 4.6 7e41ba7a68 fix: address Codex review — stable layout, scoped infra filter, basename dedup
P1: Separate force layout computation from visual state updates so
clicking/searching/touring doesn't re-randomize node positions. Layout
only recomputes when the graph data or filters change.

P1: Restrict infrastructure-file skipping (index.md, log.md, etc.) to
the wiki root level only. Nested files like concepts/index.md are now
correctly treated as content articles.

P2: Track ambiguous bare basenames in the wikilink resolution map.
Duplicate basenames (e.g., a/foo.md and b/foo.md) are removed from
the flat lookup so [[foo]] doesn't silently resolve to the wrong page.

Also fixed: edge IDs now use stable source-target-type keys instead of
array indices for proper React reconciliation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:21:24 +08:00
Lum1104andClaude Opus 4.6 2fc85e68c3 feat: add /understand-knowledge for Karpathy LLM wiki knowledge bases
Support the Karpathy LLM wiki pattern — a three-layer architecture
(raw sources + wiki markdown + schema) with wikilinks, index.md
categories, and append-only log.md.

Pipeline:
- parse-knowledge-base.py: deterministic extraction of articles,
  wikilinks, categories from index.md, source nodes from raw/
- article-analyzer agent: LLM-based entity/claim extraction and
  implicit relationship discovery (builds_on, contradicts, etc.)
- merge-knowledge-graph.py: combines scan + analysis with entity
  dedup, layer assignment from categories, tour generation

Dashboard:
- KnowledgeGraphView with d3-force layout (community clustering
  by index.md categories, degree-proportional sizing)
- 5 knowledge node types (article, entity, topic, claim, source)
- 6 knowledge edge types with visual styling
- KnowledgeNodeDetails sidebar (wikilinks, backlinks, preview)
- Auto-detect kind:"knowledge" → knowledge-only view mode

Core:
- 5 node types + 6 edge types added to NodeType/EdgeType unions
- KnowledgeMeta interface (wikilinks, backlinks, category, content)
- kind field on KnowledgeGraph for view mode detection
- Zod schemas + node/edge type aliases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:09:41 +08:00
Lum1104andClaude Opus 4.6 d3de6dc1fd fix: address code review — remove bin/ from defaults, fix negation override flow
- Remove bin/ from DEFAULT_IGNORE_PATTERNS (Node/Ruby CLI launchers use bin/)
- .NET users can add bin/ to .understandignore manually
- Fix project-scanner Step 2.5 to re-filter from original file list when
  .understandignore exists, ensuring ! negation correctly overrides defaults

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 11:51:59 +08:00
Lum1104andClaude Opus 4.6 59a6f56bfe feat(skill): add Phase 0.5 for .understandignore setup and review pause
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 11:39:45 +08:00
Lum1104andClaude Opus 4.6 3e27a4a8d4 feat(agent): add .understandignore support and bin/obj exclusions to project-scanner
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 11:38:23 +08:00
Lum1104 4201cbcb9e feat(core): export IgnoreFilter and IgnoreGenerator from core index 2026-04-10 11:36:53 +08:00