Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Serve
Context assembly
Ranked code, neighbours and rules, rendered with citations inside a budget.
Recorded run
PHAROS at 975a38dMIT license
How it works
The same call serves REST, MCP and the CLI. It returns structured chunks and a Markdown rendering with path and line citations.
The response records whether the budget truncated it.
Recorded runs through it
Source evidence
- Assemble the context
backend/app/codeintel/context.py:154–261The call the REST endpoint, the MCP tool and the CLI share. - Render with citations
backend/app/codeintel/context.py:321–360Markdown with path and line citations, cut to a character budget. - The character budget
backend/app/codeintel/context.py:64–79Records when the budget truncated the response. - Resolve the repository
backend/app/codeintel/context.py:82–88With no repository named it returns an empty list, and the search then spans the whole index. Scoping is opt-in. - One hop of the graph
backend/app/codeintel/retrieval.py:567–590Calls and imports around the top hits. Containment edges are left out.
Claims this supports
In a recorded run at commit 975a38d, a question sent through native MCP returned five chunks, each fetched from GitHub and matched against its indexed Git blob.
One local run with a question chosen by the author. Not a benchmark and not the deployed service.
