Auto-Fix & AI Author Mode
Let DocuGardener handle documentation updates automatically — especially for AI-authored code.
Auto-Fix
When DocuGardener detects documentation drift, it generates exact Markdown diffs showing what needs to change. You can apply these fixes in two ways:
- One-click from the Triage Inbox— Click “Apply fix” on any finding. DocuGardener opens a pull request with the suggested documentation changes, linked back to the original analysis.
- Automatic via AI Author Mode — When enabled, DocuGardener creates and merges fix PRs without any human intervention for qualifying pull requests (see below).
AI Author Mode
AI Author Mode is designed for teams that use AI coding agents extensively. When a pull request is authored by an AI tool — and documentation drift is detected — DocuGardener automatically opens a fix PR and merges it once CI passes. Zero human intervention.
How DocuGardener Detects AI-Authored PRs
DocuGardener uses four signals to determine whether a PR was authored by an AI agent:
| Signal | Example |
|---|---|
| Bot sender | PR opened by dependabot[bot], renovate[bot], or a GitHub App |
| Branch prefix | Branch starts with copilot/, cursor/, devin/, or claude/ |
| PR body marker | PR description contains known AI tool signatures (e.g. “Generated by Copilot”) |
| Custom pattern | A regex pattern you define in Agent Governance settings |
If any of these signals match, the PR is classified as AI-authored.
When Does AI Author Mode Fire?
AI Author Mode fires when all three conditions are met:
- The PR is detected as AI-authored (any of the four signals above).
- AI Author Mode is enabled in your settings.
- The drift analysis found at least one documentation update to make (i.e. the suggested fix is non-empty).
When these conditions are met, DocuGardener opens a documentation fix PR targeting the same base branch and attempts to auto-merge it after CI passes.
Auto-Merge Methods
You can configure which merge strategy DocuGardener uses for auto-merging fix PRs:
- Squash (default) — All fix commits are squashed into a single commit.
- Merge commit — A standard merge commit is created.
- Rebase — Fix commits are rebased onto the target branch.
CI Gate
DocuGardener polls the fix PR’s check status using exponential backoff. Once all required checks pass, the PR is merged automatically. If checks fail, the finding in the Triage Inbox transitions from “AI working” to “Fix ready” with a note that manual review is needed.
Auto-Heal Mode
In addition to AI Author Mode, DocuGardener supports Auto-Heal — which triggers a fix PR for any pull request (not just AI-authored ones) when the drift score meets or exceeds a configurable threshold. Enable this in Settings → Agent Governance → Auto-Heal.
Configuration
Both AI Author Mode and Auto-Heal are configured in Settings → Agent Governance:
- AI Author Mode toggle — Enable or disable automatic fix PRs for AI-authored PRs.
- Auto-merge method — Choose squash, merge, or rebase.
- Auto-Heal toggle — Enable automatic fix PRs for all PRs above the drift threshold.
- Auto-Heal threshold — Drift score at which Auto-Heal fires (default matches your
DRIFT_SCORE_THRESHOLD).