Root cause, plan, changes, pull request
The agent starts from what Buglapse already knows: the stack trace, the breadcrumbs, the release and the code around the failing line. While it looks for the cause it can also ask Buglapse for other occurrences of the same issue and for the affected user. It is given the steps to the error as well: chains of actions that many occurrences went through in the same order, so the trigger is not guessed from a single session. It explores the repository to find where the problem really comes from, explains what it is going to change and why, and only then writes the patch. Every fix lands on a new branch as a draft, and if your CI fails on it the agent can try to repair its own change, up to the number of attempts your plan allows. Per-project instructions let you tell it which folders to touch and which style to follow.