CodeGraph is a tool that gives coding agents direct access to the depths of a codebase. It’s orders of magnitude more efficient (both in time and token use) than plain text search.
Unfortunately, on an Ada codebase, it currently returns “0 files indexed” – it doesn’t know how to parse Ada. I’ve requested to implement Ada support and added helpful detail information.
The project maintainer uses GitHub reactions to gauge interest in a language and decide on implementation priority.
Regardless if you’re into LLM-assisted coding or not, I’m convinced it can only help Ada if there’s support for it in modern developer tooling. That’s why I’m asking you kindly to leave a thumbs-up on my inclusion request.
I wasn’t familiar with codegraph, thanks for the reference. The tool looks sophisticated and efficient.
On my side, I had noticed with Mistral that when I referenced a variable, it would perform a very “primitive” search, relying on grep / ls / find to locate variables or identify the relevant files.
I figured then that in an Ada skill, it would be worth telling the LLM how to use gnatfind or gnatxref (having it read the .ali files directly seems less efficient) to navigate the source code more effectively.
This would be a simpler “low-tech” solution to reduce the tokens wasted navigating the sources, with the downside of requiring compilable sources, but with the advantage of doing without yet another MCP server, and with no risk of misinterpreting the source code.
I wanted to try my low-tech approach based on gnat find / gnat xref, but I’ve just discovered that these utilities are no longer distributed with the GNAT 16 native toolchain installed through Alire.
Am I missing something, or have they actually been removed?
And if so, why is gnatls still being shipped? It seems to me that gnatfind and gnatxref would be much more useful than gnatls for code navigation and semantic analysis.
To give you an idea of just how low-tech the approach is, I was simply planning to add the following to my AGENTS.md
## Ada / GNAT
Prefer semantic navigation over text search.
- `gnat find SYMBOL -P bbt.gpr` when investigating a symbol
- `gnat xref -P bbt.gpr` when investigating architecture, dependencies or impact
Use grep only for comments, strings and documentation.
I remember seeing gnatfind and gnatxref considered deprecated, but it’s a shame, because they were useful and I don’t see a clear alternative. I suppose they were based on ASIS and it is all related to its deprecation.
Maybe the alternative is ada_language_server? Can it be queried by a user/agent from the command line?
In theory, gpr_query is an alternative to gnatxref and it’s in Alire, but I was unable to get it compiled directly.
I have an old compilation for Emacs and it works. It’s a bit weird to use it directly, but probably the agents won’t mind as we do.
Yes, I got the info and forgot to forward it here, both where mark deprecated long time ago and then removed.
It seems that there is no easy way to get an intermediate solution between grep and mcp!
ALS is the way to go, and now I experiment the mcp-als bridge.