TreeSitter Integration #953
TheApeMachine
started this conversation in
Ideas
Replies: 2 comments · 1 reply
-
This is a great idea, and totally on our radar. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This would be fantastic. I dont know if this helps you at all, but RooCode and KiloCode (same thing) use tree-sitter for various things, including a codebase indexer that stores embeddings (genreated via whatever embedding provider youve selected) in qdrant. It works quite well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TreeSitter ideas for Crush
The thinking is that TreeSitter can help Crush build safer, smarter AI-assisted workflows.
Why TreeSitter here?
What I am trying out already
symbols
: list top‑level symbols for a file.impact
: first‑pass change‑impact analysis. Confirms definition presence and finds references via ripgrep; returns buckets (definitions/imports/call_sites/test_files) with a rough “blast‑radius” score.Near‑term ideas (incremental, pragmatic)
Context packer tool
Find‑refs / Go‑to‑def tools (AST‑aware)
Preflight edit guardrails (agent middleware)
impact
(+ context packer) and score blast‑radius.Postflight verification
impact
to ensure no new unresolved refs appeared.Better classification of references
Medium‑term improvements
AST‑aware refactors
Semantic chunking for RAG
Structural diff summaries
Test scaffolding
Style/security queries
Longer‑term experiments
Cross‑language dependency mapping
Prompt budget optimizer
This would work quite well also in combination with GraphRAG, a while back I experimented with using TreeSitter to analyze our platform at work, consisting of multiple codebases, using various languages, and building up a connected graph in Neo4J (though any graph database would work).
The benefit there is that relationships become first-class citizens in the context, and graph-based algorithms can be used for all kinds of things, such as finding the shortest path between two nodes, finding the most similar nodes to a given node, or even community detection.
Just some ideas, not even to sure how viable/useful they are. I'll probably give some of these a try anyway.
Beta Was this translation helpful? Give feedback.
All reactions