DocuGardenerDocs

Cross-Repo Drift Detection

DocuGardener can fan out drift analysis across sibling repositories. When a code change in one repo would break documentation in a related repo, the finding surfaces in the same PR review — without requiring a separate analysis run.

Beta feature

Cross-repo drift detection is in beta. Enable it with CROSS_REPO_BETA=true and a TEAM or ENTERPRISE plan. The feature is off by default.

What It Does

When a PR is opened in a watched repository, DocuGardener normally analyses documentation drift within that single repo. With cross-repo drift detection enabled, the analysis pipeline also queries the vector index for related documentation in sibling repositories. Any drift found in those siblings is reported as an additional section in the PR check-run comment.

Sibling findings are validated before surfacing. DocuGardener applies a confidence gate and a prompt injection defence to ensure that findings from adjacent repos are genuine and not artefacts of unrelated content.

Configuring Sibling Repos

Sibling repositories are configured per repository. Navigate to Settings → Repositories, select the repository you want to configure, and add the sibling repo full names (e.g. acme-org/backend) in the Cross-repo siblings field.

This field is only visible for TEAM and ENTERPRISE plans. Adding sibling repos on a FREE or PRO plan has no effect — the fan-out step is silently skipped.

Each entry is a owner/repo string. The sibling repos must be installed with the same DocuGardener GitHub App. Analysis will not fan out to repositories the App does not have access to.

Plan Limits

PlanSibling repos per analysisNotes
FREE Not availableFan-out step skipped
PRO Not availableFan-out step skipped
TEAMUp to 3Requires CROSS_REPO_BETA=true
ENTERPRISEUp to 10Requires CROSS_REPO_BETA=true

CROSS_REPO_BETA Kill Switch

The entire cross-repo fan-out step is guarded by the CROSS_REPO_BETA environment variable. The default is false — the feature is completely inactive unless you opt in.

Set it in your .env file or as a container environment variable:

# Enable cross-repo drift detection (TEAM+ plan required)
CROSS_REPO_BETA=true

To disable at any time, remove the variable or set it to false. No restart of the worker is required — the flag is checked at job execution time.

Example PR Report Output

When cross-repo siblings have drift, an additional section appears in the PR check-run comment below the primary findings:

## 🔗 Cross-Repo Impact

The following sibling repositories may be affected by this change:

### acme-org/docs-site (confidence: 0.87)

| File | Finding |
|------|---------|
| docs/api/authentication.md | `POST /auth/token` payload shape changed — docs still show old `client_secret` field |
| docs/api/rate-limits.md | New 429 retry-after header not documented |

> ⚠ These findings require human review before the fix PR is opened.

Fix PRs for sibling findings are opened in the sibling repo, not in the repo where the triggering PR was raised. They are linked back from the original PR comment.