Skip to content

Add Lua language support#11

Closed
itsDNNS wants to merge 1 commit into
Graphify-Labs:v3from
itsDNNS:feat/lua-support
Closed

Add Lua language support#11
itsDNNS wants to merge 1 commit into
Graphify-Labs:v3from
itsDNNS:feat/lua-support

Conversation

@itsDNNS

@itsDNNS itsDNNS commented Apr 6, 2026

Copy link
Copy Markdown

Summary

  • Adds .lua and .toc to CODE_EXTENSIONS in detect.py
  • Adds _LUA_CONFIG LanguageConfig and extract_lua() in extract.py
  • Handles Lua-specific patterns: local function, function Addon:Method(), require('module')
  • Adds tree-sitter-lua to pyproject.toml dependencies
  • Updates README language table and skill.md code extensions

Motivation

Lua is the scripting language for World of Warcraft addons, Roblox, Neovim plugins, and game engines (Love2D, Defold). tree-sitter-lua is mature (v0.5.0 on PyPI) and the generic extractor handles Lua well since functions use a name field and block body consistently.

Test plan

  • Tested on a 27-file WoW addon codebase (mixed local functions, method syntax, require imports)
  • Verified function declarations, method patterns (Addon:Method), require() imports, and call-graph extraction
  • Confirmed .toc files (WoW addon manifests) are detected as code

Adds AST extraction for .lua and .toc files, covering:
- function declarations (local and global)
- method syntax (Addon:Method patterns)
- require() import tracking
- call-graph extraction within function bodies

Tested against a WoW addon codebase with 27 Lua files.
@safishamsi

Copy link
Copy Markdown
Collaborator

Applied manually to v3 due to merge conflict from recent rebase. All changes from this PR are now in v3. Thanks @itsDNNS!

@safishamsi safishamsi closed this Apr 6, 2026
safishamsi added a commit that referenced this pull request Jun 19, 2026
…semantic scope, cache staleness, video update, transcribe robustness

Closes the non-crash tier of #1392 in the Claude-path skill fragments:
- #6/#7: build_from_json/build_merge now take directed=IS_DIRECTED in Step 4, Step 5 rebuild, and the --update merge/diff, with prose telling the agent to substitute IS_DIRECTED like INPUT_PATH (a --directed run no longer silently rebuilds undirected and collapses reciprocal edges)
- #10: semantic extraction only flattens document/paper/image, not code (AST already covers code) so subagents stop re-reading every source file
- #12: .graphify_cached.json is deleted on a cache miss so Part C never merges a stale cache from a prior run
- #11: --update now transcribes changed video files and moves transcripts to documents before the semantic pipeline
- #4/#5/#23: transcribe writes via write_text (no shell redirect), uses GRAPHIFY_WHISPER_MODEL/PROMPT env, status to stderr
- #2/#3: add-watch and exports use $(cat graphify-out/.graphify_python) explicitly; MCP Desktop config documents the absolute interpreter path
- #21: extraction-spec example id namespaced (auth_session_validatetoken)
- #22: query term split keeps tokens >= 3 chars

aider/devin monoliths are pinned by the roundtrip invariant and excluded; their own Step 1 already instructs replacing python3 with the resolved interpreter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants