Skip to content

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

1

Ingest the codebase

Make sure the repository is in your vault. See Ingest a codebase.

2

Connect your AI

Wire your MCP client to your vault — the same one-click connection used for notes. See Connect your AI.

3

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.

4

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.