Enable Deep Mode
By default, graft build uses tree-sitter for deterministic, model-free structural parsing. The --deep flag adds a second pass that uses an LLM to generate richer summaries.
What deep mode adds
Section titled “What deep mode adds”| Feature | Standard build | Deep build |
|---|---|---|
| File structure & symbols | ✅ | ✅ |
| Call graph & dependencies | ✅ | ✅ |
| Per-symbol one-line summaries | ❌ | ✅ |
| Concept nodes | ❌ | ✅ |
| “Crux” architectural insights | ❌ | ✅ |
Enable deep mode
Section titled “Enable deep mode”-
Set your LLM provider credentials
Terminal window export GRAFT_PROVIDER=openai # or anthropic, ollama, openrouter, googleexport GRAFT_API_KEY=your-keySee Configure Providers for all supported providers.
-
Run the deep build
Terminal window graft build --deepThe first deep build summarizes every source file, then groups summaries into curated nodes. Results are cached by content hash — subsequent builds only re-process changed files.
See also
Section titled “See also”- Configure Providers — Set up OpenAI, Anthropic, Ollama, and more.
- Environment Variables Reference — All
GRAFT_*environment variables. - How the Graph Works — Architecture of the two-pass build.