Commit Graph

1 Commits

Author SHA1 Message Date
ar9av 7535910719 feat(ast-extractor): local code structure extraction with no LLM calls
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.
2026-06-30 13:27:30 -07:00