How it works
One question, followed to the bottom
This is a real run on pallets/markupsafe: “Why does Markup.striptags collect the text between tags into a list in a single pass, instead of removing tags from the string one at a time?” Scroll through it step by step. The section shows what had been dug up after each step; the evidence the run set aside is left out to keep it readable.
Code now
F-01Markup.striptags in src/markupsafe/__init__.py__init__.py:199–238Commits · what changed
F-02Jan 2024improve striptags performance750e22bF-03Apr 2026improve performance of `striptags`df5d581F-04Jan 2024improve striptags performance (#413)a24df39F-05Oct 2026fix performance regression in striptags (#522)ff06d77Pull requests · the goal
F-07Oct 2026fix performance regression in striptags#522F-06Jan 2024improve striptags performance#413Issues · the need
F-08Apr 2026Performance regression in striptags#521
The finished run
- 0:03
Plan
The model reads the question, names the files and functions it is about, decides whether it asks why the code is this way or how it works now, and writes one search per source.
In this run A why question about Markup.striptags. Searches: code “def striptags”; commit messages “striptags single pass performance”; pull requests “striptags implementation list join”; docs “Markup.striptags method details”.
- 0:03
Search, four ways at once
Code, docs, commit messages and pull requests are searched in parallel. Code, docs and commits come from a local index of the clone (keyword search, plus meaning-based search where the server has the memory for it); pull requests come from GitHub.
In this run docs: 6 hits · code: 6 hits · commit messages: 6 hits · pull requests: 0 hits.
- 0:05
Trace the history
For the code in question it follows the function itself through git log -L, so commits that only touched other parts of the file don't count.
In this run 13 commits changed the code in question.
- 0:09
Grade the evidence
Every find gets a relevance grade from 0 to 3. Low grades are set aside, not deleted. The grader also picks the links worth following: the pull request a commit names, the issue a pull request fixes.
In this run Graded 30 new finds; 5 kept so far. Next, follow #413, #522, #496, #437.
- 0:10
Follow the links · hop 1
Each hop fetches the linked commits, pull requests and issues in full, discussion included, and grades them too. A pull request that was closed without merging is marked as not shipped, and the answer is told not to present it as the reason.
In this run Hop 1: fetched #413, #522, #496, #437.
- 0:11
Grade the evidence
In this run Graded 4 new finds; 7 kept so far. Next, follow #521.
- 0:11
Follow the links · hop 2
In this run Hop 2: fetched #521.
- 0:12
Grade the evidence
In this run Graded 1 new find; 8 kept so far. Nothing left worth following.
- 0:18
Write the answer
The answer cites a find for every claim. Why-questions separate what changed from why it changed; what and how questions explain the code as it is now.
In this run Drafted an answer citing 4 finds, with high confidence.
- 0:43
Check every claim
A second pass splits the draft into claims and checks each against the evidence it cites. Unsupported claims trigger one more search, then are flagged if they still can't be backed.
In this run 8 claims checked, all supported.
- 0:43
Answer
Citations that point at nothing retrieved are removed and reported. What remains is the answer, its finds, and how it was found.
In this run 4 sources cited after 2 hops, 44s in all.
Why, or how
Questions about why (why is this here, when did it start, who wanted it) dig through history as above. Questions about what the code does, where something happens or how it works are answered from the code and docs as they are now: the answer explains instead of digging, and skips links it doesn't need.
Repositories with little history
A new repository, or one imported in a single commit, has nothing to dig through. The repository page says so, and answers come from the code and docs as they are now. It won't invent a motive that no commit, pull request or issue records.
What it doesn't do
- It doesn't guess. When nothing says why, the answer says the evidence doesn't establish it.
- It doesn't write anything: no code changes, no comments on GitHub. It only reads.
- The hosted version doesn't open private repositories. Run it yourself and it opens any clone on your disk.