Code Q&A
Code Q&A lets your own AI answer questions about your codebase over MCP, grounded in and cited to the actual source.
It's the same grounded, cited model as notes Q&A — Altretta ships no model of its own; you bring yours. The difference here is what the AI reads: your ingested code and its symbol graph, exposed over MCP as a queryable, citable source.
Ask about your code
Ingest the codebase
Make sure the repository is in your vault. See Ingest a codebase.
Connect your AI
Wire your MCP client to your vault — the same one-click connection used for notes. See Connect your AI.
Ask
Ask in plain language — "where is auth enforced?", "what calls this function?", "why does this module depend on that one?" The AI queries the graph and answers from what it finds.
Check the citations
Every claim points back to real source, so you can jump to the exact code behind the answer.
Grounded, not guessed
Code Q&A inherits the whole trust model of Altretta's AI:
- Query-first, not paste-and-pray. The model pulls the exact symbols and passages that bear on your question instead of swallowing the whole repo, so an answer costs a fraction of the input a full-repo paste would.
- Cited to real source. Answers quote the code they're based on, so you verify rather than trust.
- Honest when the evidence is thin. The same groundedness verdict applies: if your question isn't answerable from the code, the AI says so instead of inventing an implementation.
This is a chatbot that has actually read your codebase as a graph — not one you've pasted a few files into and hoped. It answers from your source and shows its work.
Signed provenance for code, too
Because the codebase lives in the same signed graph as your notes, a citation in a code answer carries a verifiable provenance anchor — and every ingest is recorded with its git provenance in the signed DAG. You can show later exactly which version of which source an answer was built from. See Signed history.
Combine Code Q&A with Impact Radius: use the radius to see what a change touches, then ask the AI why — grounded in the real relationships.
Related
Code Cartography
The overview of Altretta reading your repository as a structural graph.
Grounded, cited answers
The full trust model behind every cited answer, code or notes.
Connect your AI
Wire your MCP client to the vault — the same one-click connection.
Impact Radius
See what a change touches, then ask the AI why.
MCP tools reference
The tools your AI calls to query the graph over MCP.
Glossary
Grounded answer, citation, MCP, and provenance, defined.