Commit Graph
369 Commits
Author SHA1 Message Date
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 5fa01446fc chore: remove unused demo video env vars from homepage workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 17:07:37 +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
Yuxiang LinandGitHub 3f07df056f Merge pull request #89 from Lum1104/fix/graph-builder-use-language-registry
feat: multi-language tree-sitter extractor architecture (10 languages)
2026-04-15 22:34:33 +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 b2fb97b884 docs: add implementation plan for multi-language tree-sitter extractor architecture
Plan covers: LanguageExtractor interface, per-language extractors for 8 languages
(Python, Go, Rust, Java, Ruby, PHP, C/C++, C#), bundled extract-structure.mjs
script replacing LLM-generated regex in file-analyzer agent, and PluginRegistry
enhancements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:01:57 +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
Lum1104andClaude Opus 4.6 a42ba9119a fix: correct live demo URLs in all READMEs to point to /demo/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:22:45 +08:00
Lum1104andClaude Opus 4.6 90dc2d453e fix: add trailing slash to BASE_URL for demo iframe path
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:18:41 +08:00
Lum1104andClaude Opus 4.6 5ac194885f fix: remove iframe sandbox to fix demo loading on custom domain
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:15:49 +08:00
Lum1104andClaude Opus 4.6 dc84b07159 feat: embed live demo in homepage and add demo link to all READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:12:19 +08:00
Lum1104andClaude Opus 4.6 f291628892 feat: embed live interactive demo in homepage, replacing video/GIF showcase
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:08:28 +08:00
Yuxiang LinandGitHub f2dce56678 Merge pull request #88 from JohnWong/main
fix: include access token in auto-opened dashboard URL
2026-04-13 23:51:30 +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
Lum1104andClaude Opus 4.6 16868f200d redesign: full homepage refresh with gradient keywords, new problem section, and improved visual hierarchy
- Hero: gradient "Understand" headline, badge pill, staggered entrance animations, star icon for GitHub
- New Problem section: structure vs meaning comparison with hairball SVG and domain preview cards
- Showcase: split into structural (table stakes) and business knowledge (star) with pill labels and feature tags
- Features: 2-column layout with gradient icons and tighter copy
- Install: copy-to-clipboard button
- Footer: expanded with Live Demo link and updated tagline
- Global: rose-gold-to-gold gradient tokens, .grad text utility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:30:57 +08:00
Yuxiang LinandGitHub a38dea9824 Merge pull request #85 from avenue9977/refactor/Improve-graph-builder
Refactor/improve graph builder
2026-04-13 16:59:38 +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
Lum1104andClaude Opus 4.6 ba461006ce docs: add "graphs that teach > graphs that impress" tagline to all READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:34:37 +08:00
Lum1104andClaude Opus 4.6 569ed2a1c7 docs: add Copilot CLI installation instructions to all README translations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 19:57:00 +08:00
Yuxiang LinandGitHub d16b27eb20 Merge pull request #84 from yujiachen-y/main
fix: add plugin manifest at marketplace-declared source path
2026-04-12 19:22:26 +08: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>
v2.3.1
2026-04-12 15:23:50 +08:00
Yuxiang LinandGitHub 2162e6d5eb feat: add .understandignore support for user-configurable file exclusion 2026-04-12 12:49:32 +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 c2f5b02b2d docs: add Korean and Spanish README translations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:31:46 +08:00