feat: add AI merge gate and documentation drift detector#132
Merged
JacobPEvans merged 7 commits intomainfrom Apr 8, 2026
Merged
feat: add AI merge gate and documentation drift detector#132JacobPEvans merged 7 commits intomainfrom
JacobPEvans merged 7 commits intomainfrom
Conversation
Add two new workflows: 1. _ai-merge-gate.yml — reusable status aggregator that waits for Copilot gh-aw agent checks to complete and reports a single pass/fail. Branch protection requires only "AI Merge Gate" instead of individually configuring each AI workflow. 2. gh-aw-documentation-drift.md — Copilot cloud agent that detects documentation drift when code changes on main aren't reflected in docs. Opens draft PRs with targeted fixes. Free with GitHub subscription, uses signed commits. (claude)
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Pull request overview
Adds two automation workflows to centralize AI-related gating and keep documentation aligned with code in this reusable GitHub Actions workflows repository.
Changes:
- Introduces a reusable “AI Merge Gate” workflow to aggregate Copilot agent check results into a single required status.
- Adds a Copilot agent workflow that detects documentation drift on pushes to
mainand opens a draft PR with fixes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/_ai-merge-gate.yml |
New reusable status aggregator workflow intended to wait for Copilot-related checks and report a single pass/fail. |
.github/workflows/gh-aw-documentation-drift.md |
New Copilot agent definition for post-merge documentation drift detection and automated draft PR creation. |
- Add permissions + concurrency to dogfood caller (fixes CodeQL) - Remove unused required_checks input from _ai-merge-gate.yml - Add workflow_dispatch trigger to _ai-merge-gate.yml - Add bash: true to doc-drift agent tools (needed for git/grep/find) - Fix multi-commit push handling in doc-drift (use before..after range) (claude)
Rewrote _ai-merge-gate.yml from 60-line polling script to 5-line native gh CLI check. No custom scripts — single API call verifies Copilot agent check status. Slimmed dogfood caller to 6 lines. (claude)
Our custom gh-aw-documentation-drift.md was reinventing what GitHub Next already maintains. Replace with the official githubnext/agentics/update-docs template (sourced via gh aw add). Follows the same pattern as our other 5 gh-aw agents which are also sourced from githubnext/agentics. (claude)
Copilot setup is an AI workflow and belongs in ai-workflows, not .github. Moved from JacobPEvans/.github/_copilot-setup-steps.yml — identical functionality, correct source of truth. Nix repos (nix-darwin, nix-ai) will be updated to call this in follow-up PRs. Non-Nix repos define their own copilot-setup-steps.yml with repo-specific tooling. (claude)
Official agentics templates belong in individual repos via gh aw add, not copied into ai-workflows. No custom prompts here. (claude)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_ai-merge-gate.yml— Reusable status aggregator. Polls for Copilot gh-aw agent check runs on the PR, waits for completion, reports single pass/fail. Branch protection requires only "AI Merge Gate" instead of N individual checks.gh-aw-documentation-drift.md— Copilot cloud agent triggered on push to main. Compares code changes against docs (README, docs/, docstrings). Opens draft PR with fixes when drift detected. Free with GitHub subscription.Architecture
The merge gate is a status aggregator, not an executor. Agents run independently via GitHub's Copilot infrastructure. The gate just waits for them and reports.
Test plan
🤖 Generated with Claude Code