mirror of
https://github.com/Ar9av/obsidian-wiki.git
synced 2026-09-14 20:36:34 +08:00
7535910719
Adds `obsidian-wiki ast-extract <path>` — a free, local pass that extracts classes, functions, imports, and inheritance edges from code files using deterministic regex patterns before any token is spent on the LLM. - New `obsidian_wiki/ast_extractor.py`: Graph/Node/Edge datamodel + per-language LangSpec patterns for Python, JS/TS, Go, Rust, Java, Kotlin, Ruby, C/C++, Swift, Shell (12 languages). Outputs god_nodes (top hubs by degree), stats, and a node-link JSON dict compatible with any graph tool. - New `ast-extract` CLI subcommand with `--pretty` flag. - Optional `obsidian-wiki[ast]` extra for tree-sitter upgrade path. - wiki-ingest SKILL.md gets Step 1c: run ast-extract first on code sources, seed entity pages from class nodes, skip sending code files to the LLM. - 19 new tests covering file extraction, directory merge, CLI output, edge cases.
5.1 KiB
5.1 KiB