-
-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Problem
The AST semantic tools (search_property_wrappers, search_concurrency, search_conformances, search_symbols) return sparse or empty results for common patterns:
search_property_wrapperswith@Observable→ 0 resultssearch_concurrencywithactorfiltered to SwiftUI → 0 resultssearch_conformanceswithSendable→ only AV framework protocols
Meanwhile, search_conformances for Sendable did return some results, suggesting partial AST data exists but coverage is incomplete.
The core search + read_document pipeline works excellently (BM25 ranking is accurate, 320K+ docs are well-indexed), so the gap is specifically in AST-extracted symbol data.
Root cause (suspected)
AST indexing currently lives in the index command (sample code only), separate from save (docs indexing). This means:
- AST extraction only covers sample code Swift files, not Apple documentation pages that contain code
- Users who run
savebut notindexget no AST data at all - Even with
index, coverage is limited to samples
Proposal
Integrate AST indexing into the save command so that code blocks within Apple documentation pages are also parsed with SwiftSyntax during the main indexing pass. This would populate doc_symbols, doc_imports, and related tables with symbols extracted from all sources — not just sample code.
This would make the semantic search tools (search_symbols, search_property_wrappers, search_concurrency, search_conformances) significantly more useful.