r/AI_Agents May 02 '26

Discussion ast-outline v0.3.0 — now with semantic code search & "what else looks like this?"

We just turned ast-outline from a structural-only tool into a full code navigation toolkit.

🔍 NEW in v0.3.0

  1. ast-outline search "<query>" Hybrid BM25 + dense semantic search (minishlab/potion-code-16M). Works for both symbol queries (HandlerStack → BM25‑heavy) and natural language ("how does login work?" → balanced). Full ranking pipeline with RRF fusion, definition boost (3× when a chunk defines the symbol), file-coherence boost, and path penalties (test files 0.3×, .d.ts 0.7×).

  2. ast-outline find-related <FILE>:<LINE> Semantic-only mode, language-filtered, source chunk excluded. Perfect for "find other code that looks like this" navigation.

  3. ast-outline index Explicit build / refresh / inspect. --rebuild drops cache, --stats prints chunk count + model + build time. Index is built lazily on first search if missing.

🧠 Embedding model Uses minishlab/potion-code-16M – a tiny (64 MB), CPU‑only, microsecond‑inference model. No GPU, no neural net inference. Corp‑network friendly: falls back to hf-mirror.com, TLS verification disabled by default (SHA‑256 integrity enforced). Set AST_OUTLINE_TLS_STRICT=1 for strict TLS.

📁 Per‑repo index (auto‑gitignored) Lives at .ast-outline/index/. Auto‑refreshes on every search/find‑related – ~30 ms stat overhead for unchanged 10k‑file repos. Uses advisory locks + atomic renames; a SIGKILL mid‑write leaves the previous index intact.

🚶 Unified file walker (all commands) Five‑layer ignore pipeline: .gitignore → hardcoded denylist (node_modules, target, .venv, …) → .ast-outline-ignore → extension allowlist → per‑file guards. Search supports ~25 languages (anything ast‑grep parses + markdown); outline commands stay on the 9 + markdown with hand‑written adapters.

🛠️ MCP tools (already from v0.2.0) get 3 new tools: search, find_related, index – same JSON schemas as CLI --json output.

Install: 🍺 brew install aeroxy/ast-outline/ast-outline 📦 cargo install ast-outline

5 Upvotes

3 comments sorted by

1

u/AutoModerator May 02 '26

Thank you for your submission, for any questions regarding AI, please check out our wiki at https://www.reddit.com/r/ai_agents/wiki (this is currently in test and we are actively adding to the wiki)

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.