Skip to main content
For findings that require semantic edits or refactoring, raigal agent runs an iterative repair session with a local coding tool inside an isolated git worktree.

How worktree repairs work

To protect your active working branch from unverified edits, raigal agent isolates all changes:
  1. Raigal creates an ephemeral git worktree at .raigal/worktrees/agent-<timestamp>-<pid>/, automatically registered in .git/info/exclude to prevent polluting git status.
  2. The agent provider (Claude Code, OpenCode, or Codex) receives diagnostic output, file context, and target score expectations in its prompt.
  3. The provider makes edits and verifies changes inside the worktree.
  4. After reviewing the diff, you can run raigal agent apply <session-id> to merge changes locally, or pass --pr to open a pull request on GitHub.

Supported providers

Raigal supports three local coding tools: Check which providers are installed on your machine:

Workflows

1. Interactive local repair session

Preview and test changes locally before committing:

2. Automated pull request creation (--pr)

To create a branch and open a pull request automatically, run:
With --pr, Raigal:
  1. Runs safe autofixes and passes remaining issues to the agent provider.
  2. Checks that the quality score meets --target (default: 90).
  3. Commits the changes to an isolated branch (raigal/repair-...).
  4. Pushes the branch and opens a GitHub pull request.
  5. Sends telemetry to Raigal Cloud to create a card in the Agent Actions column.

3. Lifecycle synchronization (report-pr-closed)

When an agent pull request is merged or closed on GitHub, update your board status with a GitHub Actions workflow:
Opening a pull request with raigal agent --pr creates a card in the Agent Actions tab. When merged, report-pr-closed moves it to Merged and records the score delta.